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 regular Inspect VMO once, without retrying if a concurrent write is in progress.
Returns a Snapshot on success or an Error if a consistent snapshot could not be taken.
Sourcepub fn try_once_from_blob_vmo(source: &Vmo) -> Result<Snapshot, ReaderError>
pub fn try_once_from_blob_vmo(source: &Vmo) -> Result<Snapshot, ReaderError>
Try to take a consistent snapshot of the given Blob VMO once, without retrying if a concurrent write is in progress.
Returns a Snapshot on success or an Error if a consistent snapshot could not be taken.
Sourcepub fn try_from_blob_vmo(source: &Vmo) -> Result<Snapshot, ReaderError>
pub fn try_from_blob_vmo(source: &Vmo) -> Result<Snapshot, ReaderError>
Try to take a consistent snapshot of the given Blob VMO, retrying up to
SNAPSHOT_TRIES times if concurrent writes are detected.
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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
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> ⓘ
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> ⓘ
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