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) -> Option<ScannedBlock<'_>>
pub fn get_block(&self, index: BlockIndex) -> Option<ScannedBlock<'_>>
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