pub struct Snapshot { /* private fields */ }Expand description
Enables to scan all the blocks in a given buffer.
Implementations§
Source§impl Snapshot
 
impl Snapshot
Sourcepub fn scan(&self) -> BlockIterator<'_> ⓘ
 
pub fn scan(&self) -> BlockIterator<'_> ⓘ
Returns an iterator that returns all the Blocks in the buffer.
Sourcepub fn get_block(
    &self,
    index: BlockIndex,
) -> Result<ScannedBlock<'_, Unknown>, ReaderError>
 
pub fn get_block( &self, index: BlockIndex, ) -> Result<ScannedBlock<'_, Unknown>, ReaderError>
Gets the block at the given |index|.
Sourcepub fn try_once_from_vmo(source: &Vmo) -> Result<Snapshot, ReaderError>
 
pub fn try_once_from_vmo(source: &Vmo) -> Result<Snapshot, ReaderError>
Try to take a consistent snapshot of the given VMO once.
Returns a Snapshot on success or an Error if a consistent snapshot could not be taken.
Trait Implementations§
Source§impl TryFrom<Snapshot> for PartialNodeHierarchy
 
impl TryFrom<Snapshot> for PartialNodeHierarchy
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnwindSafe for Snapshot
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, D> Encode<Ambiguous1, D> for Twhere
    D: ResourceDialect,
 
impl<T, D> Encode<Ambiguous1, D> for Twhere
    D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
    D: ResourceDialect,
 
impl<T, D> Encode<Ambiguous2, D> for Twhere
    D: ResourceDialect,
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