pub struct MemorySource { /* private fields */ }Implementations§
Trait Implementations§
Source§impl ByteSource for MemorySource
impl ByteSource for MemorySource
Source§fn read_at(&self, offset: u64, len: usize) -> Result<Bytes>
fn read_at(&self, offset: u64, len: usize) -> Result<Bytes>
Read up to
len bytes at offset, returning fewer at end of file.fn is_empty(&self) -> Result<bool>
Source§fn prefetch(&self, _ranges: &[Range<u64>])
fn prefetch(&self, _ranges: &[Range<u64>])
Announce ranges that are about to be read, so a source that can fetch
them together does. A no-op unless overridden. Read more
Source§fn close(&self)
fn close(&self)
Release the underlying handle. Idempotent; reads after it fail with
Error::Closed.Auto Trait Implementations§
impl !Freeze for MemorySource
impl RefUnwindSafe for MemorySource
impl Send for MemorySource
impl Sync for MemorySource
impl Unpin for MemorySource
impl UnsafeUnpin for MemorySource
impl UnwindSafe for MemorySource
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> 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