pub struct FileContentsWithChunkedCaching<S: FileByteSource> { /* private fields */ }
Implementations
sourceimpl<S: FileByteSource> FileContentsWithChunkedCaching<S>
impl<S: FileByteSource> FileContentsWithChunkedCaching<S>
Trait Implementations
sourceimpl<S: FileByteSource> FileContents for FileContentsWithChunkedCaching<S>
impl<S: FileByteSource> FileContents for FileContentsWithChunkedCaching<S>
sourcefn read_bytes_at(&self, offset: u64, size: u64) -> FileAndPathHelperResult<&[u8]>
fn read_bytes_at(&self, offset: u64, size: u64) -> FileAndPathHelperResult<&[u8]>
Must return a slice of the file contents, or an error.
The slice’s lifetime must be valid for the entire lifetime of this
FileContents
object. This restriction may be a bit cumbersome to satisfy;
it’s a restriction that’s inherited from the object
crate’s ReadRef
trait. Read more
sourcefn read_bytes_at_until(
&self,
range: Range<u64>,
delimiter: u8
) -> FileAndPathHelperResult<&[u8]>
fn read_bytes_at_until(
&self,
range: Range<u64>,
delimiter: u8
) -> FileAndPathHelperResult<&[u8]>
TODO: document
sourcefn read_bytes_into(
&self,
buffer: &mut Vec<u8>,
offset: u64,
size: usize
) -> FileAndPathHelperResult<()>
fn read_bytes_into(
&self,
buffer: &mut Vec<u8>,
offset: u64,
size: usize
) -> FileAndPathHelperResult<()>
Append size
bytes to buffer
, starting to read at offset
in the file.
If successful, buffer
must have had its len increased exactly by size
,
otherwise the caller may panic. Read more
Auto Trait Implementations
impl<S> !RefUnwindSafe for FileContentsWithChunkedCaching<S>
impl<S> Send for FileContentsWithChunkedCaching<S> where
S: Send,
impl<S> !Sync for FileContentsWithChunkedCaching<S>
impl<S> Unpin for FileContentsWithChunkedCaching<S> where
S: Unpin,
impl<S> UnwindSafe for FileContentsWithChunkedCaching<S> where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more