pub struct IndexedSnapshotBundle {
pub format_version: u32,
pub source_map_id: Vec<u8>,
pub source_version: MapVersionId,
pub state_version: MapVersionId,
pub state_tree: Tree,
pub indexes: Vec<IndexedSnapshotBundleIndex>,
pub nodes: Vec<SnapshotBundleNode>,
}Expand description
Self-contained transport for one canonical indexed-collection state closure.
Fields§
§format_version: u32§source_map_id: Vec<u8>§source_version: MapVersionId§state_version: MapVersionId§state_tree: Tree§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>
pub fn inspect(bytes: &[u8]) -> Result<IndexedSnapshotBundleSummary, Error>
pub fn inspect_with_budget( bytes: &[u8], budget: &TransferBudget, ) -> Result<IndexedSnapshotBundleSummary, Error>
pub fn verify(&self) -> Result<IndexedSnapshotBundleVerification, Error>
pub fn verify_with_budget( &self, budget: &TransferBudget, ) -> Result<IndexedSnapshotBundleVerification, Error>
pub fn to_bytes(&self) -> Result<Vec<u8>, Error>
pub fn to_bytes_with_budget( &self, budget: &TransferBudget, ) -> Result<Vec<u8>, Error>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
pub fn from_bytes_with_budget( bytes: &[u8], budget: &TransferBudget, ) -> Result<Self, Error>
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