pub struct SnapshotValue<V> { /* private fields */ }
Implementations§
Source§impl<V> SnapshotValue<V>
impl<V> SnapshotValue<V>
pub fn view<R>(&self, f: impl FnOnce(&[u8]) -> R) -> Result<R>
pub fn read(&self, buf: &mut [u8]) -> Result<usize>
pub fn new_reader(&self) -> impl Read + '_
Sourcepub fn leak_snapshot_dir(&self)
pub fn leak_snapshot_dir(&self)
For testing: Leak a reference to the snapshot tempdir so it’s not cleaned up when all references are forgotten. This could possibly be used from internal tests instead.
Trait Implementations§
Source§impl<V: Debug> Debug for SnapshotValue<V>
impl<V: Debug> Debug for SnapshotValue<V>
Source§impl<V> Deref for SnapshotValue<V>
impl<V> Deref for SnapshotValue<V>
Auto Trait Implementations§
impl<V> Freeze for SnapshotValue<V>where
V: Freeze,
impl<V> RefUnwindSafe for SnapshotValue<V>where
V: RefUnwindSafe,
impl<V> Send for SnapshotValue<V>where
V: Send,
impl<V> Sync for SnapshotValue<V>where
V: Sync,
impl<V> Unpin for SnapshotValue<V>where
V: Unpin,
impl<V> UnwindSafe for SnapshotValue<V>where
V: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<R> ReadBytesAtExt for Rwhere
R: ReadAt,
impl<R> ReadBytesAtExt for Rwhere
R: ReadAt,
Source§fn read_u8_at(&self, pos: u64) -> Result<u8, Error>
fn read_u8_at(&self, pos: u64) -> Result<u8, Error>
Reads an unsigned 8-bit integer at an offset.
Source§fn read_i8_at(&self, pos: u64) -> Result<i8, Error>
fn read_i8_at(&self, pos: u64) -> Result<i8, Error>
Reads a signed 8-bit integer at an offset.
Source§fn read_u16_at<T>(&self, pos: u64) -> Result<u16, Error>where
T: ByteOrder,
fn read_u16_at<T>(&self, pos: u64) -> Result<u16, Error>where
T: ByteOrder,
Reads an unsigned 16-bit integer at an offset.
Source§fn read_i16_at<T>(&self, pos: u64) -> Result<i16, Error>where
T: ByteOrder,
fn read_i16_at<T>(&self, pos: u64) -> Result<i16, Error>where
T: ByteOrder,
Reads a signed 16-bit integer at an offset.
Source§fn read_u32_at<T>(&self, pos: u64) -> Result<u32, Error>where
T: ByteOrder,
fn read_u32_at<T>(&self, pos: u64) -> Result<u32, Error>where
T: ByteOrder,
Reads an unsigned 32-bit integer at an offset.
Source§fn read_i32_at<T>(&self, pos: u64) -> Result<i32, Error>where
T: ByteOrder,
fn read_i32_at<T>(&self, pos: u64) -> Result<i32, Error>where
T: ByteOrder,
Reads a signed 32-bit integer at an offset.
Source§fn read_u64_at<T>(&self, pos: u64) -> Result<u64, Error>where
T: ByteOrder,
fn read_u64_at<T>(&self, pos: u64) -> Result<u64, Error>where
T: ByteOrder,
Reads an unsigned 64-bit integer at an offset.
Source§fn read_i64_at<T>(&self, pos: u64) -> Result<i64, Error>where
T: ByteOrder,
fn read_i64_at<T>(&self, pos: u64) -> Result<i64, Error>where
T: ByteOrder,
Reads a signed 64-bit integer at an offset.
Source§fn read_uint_at<T>(&self, pos: u64, nbytes: usize) -> Result<u64, Error>where
T: ByteOrder,
fn read_uint_at<T>(&self, pos: u64, nbytes: usize) -> Result<u64, Error>where
T: ByteOrder,
Reads an unsigned
nbytes
-bit integer at an offset.Source§fn read_int_at<T>(&self, pos: u64, nbytes: usize) -> Result<i64, Error>where
T: ByteOrder,
fn read_int_at<T>(&self, pos: u64, nbytes: usize) -> Result<i64, Error>where
T: ByteOrder,
Reads a signed
nbytes
-bit integer at an offset.