pub struct SliceSource<'a> { /* private fields */ }Expand description
Bytes already in memory. Used by the tests and by the fuzz harness.
Implementations§
Trait Implementations§
Source§impl Source for SliceSource<'_>
impl Source for SliceSource<'_>
Source§fn read_at(&self, offset: u64, buf: &mut [u8]) -> Result<()>
fn read_at(&self, offset: u64, buf: &mut [u8]) -> Result<()>
Read exactly
buf.len() bytes at offset. Reading past the end is
an error; short reads are never returned.fn is_empty(&self) -> Result<bool>
Source§fn accounts_for_wal(&self) -> bool
fn accounts_for_wal(&self) -> bool
Whether this source has already accounted for a write-ahead log. Read more
Auto Trait Implementations§
impl<'a> Freeze for SliceSource<'a>
impl<'a> RefUnwindSafe for SliceSource<'a>
impl<'a> Send for SliceSource<'a>
impl<'a> Sync for SliceSource<'a>
impl<'a> Unpin for SliceSource<'a>
impl<'a> UnsafeUnpin for SliceSource<'a>
impl<'a> UnwindSafe for SliceSource<'a>
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