Serialize to canonical JSON bytes. Deterministic: struct field order is fixed and every field is deterministic, so the byte output — and thus the content key — is stable across client and server.
(&self)
| 107 | /// fixed and every field is deterministic, so the byte output — and thus the |
| 108 | /// content key — is stable across client and server. |
| 109 | pub fn to_canonical_bytes(&self) -> Vec<u8> { |
| 110 | serde_json::to_vec(self).expect("ViewSnapshot serializes") |
| 111 | } |
| 112 | |
| 113 | /// The content address (hex Blake3) of the canonical bytes — this object's |
| 114 | /// key in the object store and the value a `views/{name}` ref points at. |
no outgoing calls