pub struct IndexedSnapshotBundle {
pub format_version: u32,
pub source_map_id: Vec<u8>,
pub source_version: MapVersionId,
pub catalog_map_id: Vec<u8>,
pub catalog_version: MapVersionId,
pub source_tree: Tree,
pub catalog_tree: Tree,
pub control: Option<IndexControl>,
pub indexes: Vec<IndexedSnapshotBundleIndex>,
pub nodes: Vec<SnapshotBundleNode>,
}Expand description
Self-contained, canonical transport for one current coordinated snapshot.
Fields§
§format_version: u32§source_map_id: Vec<u8>§source_version: MapVersionId§catalog_map_id: Vec<u8>§catalog_version: MapVersionId§source_tree: Tree§catalog_tree: Tree§control: Option<IndexControl>§indexes: Vec<IndexedSnapshotBundleIndex>§nodes: Vec<SnapshotBundleNode>Implementations§
Source§impl IndexedSnapshotBundle
impl IndexedSnapshotBundle
pub fn node_count(&self) -> usize
pub fn byte_count(&self) -> usize
pub fn digest(&self) -> Result<Cid, Error>
pub fn summary(&self) -> Result<IndexedSnapshotBundleSummary, Error>
Sourcepub fn inspect(bytes: &[u8]) -> Result<IndexedSnapshotBundleSummary, Error>
pub fn inspect(bytes: &[u8]) -> Result<IndexedSnapshotBundleSummary, Error>
Decode, fully verify, and return only compact bundle metadata.
Sourcepub fn verify(&self) -> Result<IndexedSnapshotBundleVerification, Error>
pub fn verify(&self) -> Result<IndexedSnapshotBundleVerification, Error>
Verify hashes, exact reachability, ownership, persisted records, and tree IDs.
Sourcepub fn to_bytes(&self) -> Result<Vec<u8>, Error>
pub fn to_bytes(&self) -> Result<Vec<u8>, Error>
Encode deterministic bytes with fixed field positions and canonical ordering.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
Decode canonical bytes and reject unsupported versions or trailing data.
Trait Implementations§
Source§impl Clone for IndexedSnapshotBundle
impl Clone for IndexedSnapshotBundle
Source§fn clone(&self) -> IndexedSnapshotBundle
fn clone(&self) -> IndexedSnapshotBundle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexedSnapshotBundle
impl Debug for IndexedSnapshotBundle
Source§impl PartialEq for IndexedSnapshotBundle
impl PartialEq for IndexedSnapshotBundle
impl StructuralPartialEq for IndexedSnapshotBundle
Auto Trait Implementations§
impl Freeze for IndexedSnapshotBundle
impl RefUnwindSafe for IndexedSnapshotBundle
impl Send for IndexedSnapshotBundle
impl Sync for IndexedSnapshotBundle
impl Unpin for IndexedSnapshotBundle
impl UnsafeUnpin for IndexedSnapshotBundle
impl UnwindSafe for IndexedSnapshotBundle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more