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§
source§impl<'a, R: Read + Seek> ReadRef<'a> for ReadCacheRange<'a, R>
impl<'a, R: Read + Seek> ReadRef<'a> for ReadCacheRange<'a, R>
source§fn 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 moresource§fn 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 moresource§fn 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 moresource§fn 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 moresource§fn 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