Struct object::read::ReadCacheRange
source · [−]Expand description
An implementation of ReadRef
for a range of data in a stream that
implements Read + Seek
.
Shares an underlying ReadCache
with a lifetime of 'a
.
Trait Implementations
sourceimpl<'a, R: Read + Seek> Clone for ReadCacheRange<'a, R>
impl<'a, R: Read + Seek> Clone for ReadCacheRange<'a, R>
sourceimpl<'a, R: Read + Seek> ReadRef<'a> for ReadCacheRange<'a, R>
impl<'a, R: Read + Seek> ReadRef<'a> for ReadCacheRange<'a, R>
sourcefn read_bytes_at(self, offset: u64, size: u64) -> Result<&'a [u8], ()>
fn read_bytes_at(self, offset: u64, size: u64) -> Result<&'a [u8], ()>
Get a reference to a u8
slice at the given offset. Read more
sourcefn read_bytes_at_until(
self,
range: Range<u64>,
delimiter: u8
) -> Result<&'a [u8], ()>
fn read_bytes_at_until(
self,
range: Range<u64>,
delimiter: u8
) -> Result<&'a [u8], ()>
Get a reference to a delimited u8
slice which starts at range.start. Read more
sourcefn read_bytes(self, offset: &mut u64, size: u64) -> Result<&'a [u8], ()>
fn read_bytes(self, offset: &mut u64, size: u64) -> Result<&'a [u8], ()>
Get a reference to a u8
slice at the given offset, and update the offset. Read more
sourcefn read<T: Pod>(self, offset: &mut u64) -> Result<&'a T, ()>
fn read<T: Pod>(self, offset: &mut u64) -> Result<&'a T, ()>
Get a reference to a Pod
type at the given offset, and update the offset. Read more
sourcefn read_at<T: Pod>(self, offset: u64) -> Result<&'a T, ()>
fn read_at<T: Pod>(self, offset: u64) -> Result<&'a T, ()>
Get a reference to a Pod
type at the given offset. Read more
impl<'a, R: Read + Seek> Copy for ReadCacheRange<'a, R>
Auto Trait Implementations
impl<'a, R> !RefUnwindSafe for ReadCacheRange<'a, R>
impl<'a, R> !Send for ReadCacheRange<'a, R>
impl<'a, R> !Sync for ReadCacheRange<'a, R>
impl<'a, R> Unpin for ReadCacheRange<'a, R>
impl<'a, R> !UnwindSafe for ReadCacheRange<'a, R>
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more