pub struct RLimited<'a> { /* private fields */ }Expand description
A limited reader.
See Readable::limit for more information.
Trait Implementations§
source§impl<'a> Read for RLimited<'a>
impl<'a> Read for RLimited<'a>
source§fn read(&mut self, buf: &mut [u8]) -> Result<usize>
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
Pull some bytes from this source into the specified buffer, returning
how many bytes were read. Read more
1.36.0 · source§fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
Like
read, except that it reads into a slice of buffers. Read moresource§fn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector)1.0.0 · source§fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
Reads all bytes until EOF in this source, placing them into
buf. Read more1.0.0 · source§fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
Reads all bytes until EOF in this source, appending them to
buf. Read more1.6.0 · source§fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
Reads the exact number of bytes required to fill
buf. Read moresource§fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
read_buf)Pull some bytes from this source into the specified buffer. Read more
source§fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
read_buf)Reads the exact number of bytes required to fill
cursor. Read more1.0.0 · source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Creates a “by reference” adaptor for this instance of
Read. Read moresource§impl<'a> Readable<'a> for RLimited<'a>
impl<'a> Readable<'a> for RLimited<'a>
source§fn as_trait(&mut self) -> &mut dyn Readable<'a>
fn as_trait(&mut self) -> &mut dyn Readable<'a>
An internal method to get the reader as a trait object.
Yes, this is kinda nonsense, but Rust forces me into that. Read more
source§fn lock(&mut self, block: bool) -> Result<()>
fn lock(&mut self, block: bool) -> Result<()>
Locks the source exclusively for the current process.
This only has an effect on some sources, like files. Read more
source§fn unlock(&mut self) -> Result<()>
fn unlock(&mut self) -> Result<()>
Unlocks the source for other processes.
This happens automatically when the source goes out of scope, is closed or dropped. Read more
source§fn close(self) -> Result<Option<DataType<'a>>>
fn close(self) -> Result<Option<DataType<'a>>>
Closes the reader and can return the source if it was moved or references it. Read more
source§fn limit(&'a mut self, pos: u64, length: u64) -> Result<RLimited<'a>>
fn limit(&'a mut self, pos: u64, length: u64) -> Result<RLimited<'a>>
Limits the space the reader can read from. Read more
source§fn copy_at(
&mut self,
pos: u64,
length: u64,
target: &mut dyn Writable<'a>,
buffer_size: u64,
) -> Result<()>
fn copy_at( &mut self, pos: u64, length: u64, target: &mut dyn Writable<'a>, buffer_size: u64, ) -> Result<()>
Copies data from the current position to a target at a specific position. Read more
source§fn copy_to_at(
&mut self,
pos: u64,
target_pos: u64,
length: u64,
target: &mut dyn Writable<'a>,
buffer_size: u64,
) -> Result<()>
fn copy_to_at( &mut self, pos: u64, target_pos: u64, length: u64, target: &mut dyn Writable<'a>, buffer_size: u64, ) -> Result<()>
Copies data from the current position to a target at a specific position to a specific position. Read more
source§fn read_bytes_at(&mut self, pos: u64, len: u64) -> Result<Vec<u8>>
fn read_bytes_at(&mut self, pos: u64, len: u64) -> Result<Vec<u8>>
Reads bytes at a specific position. Read more
source§fn read_utf8_at(&mut self, pos: u64, len: u64) -> Result<String>
fn read_utf8_at(&mut self, pos: u64, len: u64) -> Result<String>
Reads an UTF-8-encoded string at a specific position. Read more
source§fn read_u8_at(&mut self, pos: u64) -> Result<u8>
fn read_u8_at(&mut self, pos: u64) -> Result<u8>
Reads an unsigned 8-bit integer at a specific position. Read more
source§fn read_u16le_at(&mut self, pos: u64) -> Result<u16>
fn read_u16le_at(&mut self, pos: u64) -> Result<u16>
Reads an unsigned 16-bit integer in little-endian byte order at a specific position. Read more
source§fn read_u16be_at(&mut self, pos: u64) -> Result<u16>
fn read_u16be_at(&mut self, pos: u64) -> Result<u16>
Reads an unsigned 16-bit integer in big-endian byte order at a specific position. Read more
source§fn read_u32le_at(&mut self, pos: u64) -> Result<u32>
fn read_u32le_at(&mut self, pos: u64) -> Result<u32>
Reads an unsigned 32-bit integer in little-endian byte order at a specific position. Read more
source§fn read_u32be_at(&mut self, pos: u64) -> Result<u32>
fn read_u32be_at(&mut self, pos: u64) -> Result<u32>
Reads an unsigned 32-bit integer in big-endian byte order at a specific position. Read more
source§fn read_u64le_at(&mut self, pos: u64) -> Result<u64>
fn read_u64le_at(&mut self, pos: u64) -> Result<u64>
Reads an unsigned 64-bit integer in little-endian byte order at a specific position. Read more
source§fn read_u64be_at(&mut self, pos: u64) -> Result<u64>
fn read_u64be_at(&mut self, pos: u64) -> Result<u64>
Reads an unsigned 64-bit integer in big-endian byte order at a specific position. Read more
source§fn read_u128le_at(&mut self, pos: u64) -> Result<u128>
fn read_u128le_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 128-bit integer in little-endian byte order at a specific position. Read more
source§fn read_u128be_at(&mut self, pos: u64) -> Result<u128>
fn read_u128be_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 128-bit integer in big-endian byte order at a specific position. Read more
source§fn read_vu7_at(&mut self, pos: u64) -> Result<u128>
fn read_vu7_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 7-bit variable-length integer at a specific position. Read more
source§fn read_vu7r_at(&mut self, pos: u64) -> Result<u128>
fn read_vu7r_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 7-bit variable-length integer in reversed byte order at a specific position. Read more
source§fn read_vu15le_at(&mut self, pos: u64) -> Result<u128>
fn read_vu15le_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 15-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn read_vu15be_at(&mut self, pos: u64) -> Result<u128>
fn read_vu15be_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 15-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn read_vu15ler_at(&mut self, pos: u64) -> Result<u128>
fn read_vu15ler_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 15-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn read_vu15ber_at(&mut self, pos: u64) -> Result<u128>
fn read_vu15ber_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 15-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn read_vu31le_at(&mut self, pos: u64) -> Result<u128>
fn read_vu31le_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 31-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn read_vu31be_at(&mut self, pos: u64) -> Result<u128>
fn read_vu31be_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 31-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn read_vu31ler_at(&mut self, pos: u64) -> Result<u128>
fn read_vu31ler_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 31-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn read_vu31ber_at(&mut self, pos: u64) -> Result<u128>
fn read_vu31ber_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 31-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn read_vu63le_at(&mut self, pos: u64) -> Result<u128>
fn read_vu63le_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 63-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn read_vu63be_at(&mut self, pos: u64) -> Result<u128>
fn read_vu63be_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 63-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn read_vu63ler_at(&mut self, pos: u64) -> Result<u128>
fn read_vu63ler_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 63-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn read_vu63ber_at(&mut self, pos: u64) -> Result<u128>
fn read_vu63ber_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 63-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn read_vu127le_at(&mut self, pos: u64) -> Result<u128>
fn read_vu127le_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 127-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn read_vu127be_at(&mut self, pos: u64) -> Result<u128>
fn read_vu127be_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 127-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn read_vu127ler_at(&mut self, pos: u64) -> Result<u128>
fn read_vu127ler_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 127-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn read_vu127ber_at(&mut self, pos: u64) -> Result<u128>
fn read_vu127ber_at(&mut self, pos: u64) -> Result<u128>
Reads an unsigned 127-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn read_uxle_at(&mut self, pos: u64, size: u8) -> Result<u128>
fn read_uxle_at(&mut self, pos: u64, size: u8) -> Result<u128>
Reads an unsigned integer in little-endian byte order at a specific position. Read more
source§fn read_uxbe_at(&mut self, pos: u64, size: u8) -> Result<u128>
fn read_uxbe_at(&mut self, pos: u64, size: u8) -> Result<u128>
Reads an unsigned integer in big-endian byte order at a specific position. Read more
source§fn read_vuxle_at(&mut self, pos: u64, size: u8) -> Result<u128>
fn read_vuxle_at(&mut self, pos: u64, size: u8) -> Result<u128>
Reads an unsigned variable-length integer in little-endian byte order at a specific position. Read more
source§fn read_vuxbe_at(&mut self, pos: u64, size: u8) -> Result<u128>
fn read_vuxbe_at(&mut self, pos: u64, size: u8) -> Result<u128>
Reads an unsigned variable-length integer in big-endian byte order at a specific position. Read more
source§fn read_vuxler_at(&mut self, pos: u64, size: u8) -> Result<u128>
fn read_vuxler_at(&mut self, pos: u64, size: u8) -> Result<u128>
Reads an unsigned variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn read_vuxber_at(&mut self, pos: u64, size: u8) -> Result<u128>
fn read_vuxber_at(&mut self, pos: u64, size: u8) -> Result<u128>
Reads an unsigned variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn read_i8_at(&mut self, pos: u64) -> Result<i8>
fn read_i8_at(&mut self, pos: u64) -> Result<i8>
Reads a signed 8-bit integer at a specific position. Read more
source§fn read_i16le_at(&mut self, pos: u64) -> Result<i16>
fn read_i16le_at(&mut self, pos: u64) -> Result<i16>
Reads a signed 16-bit integer in little-endian byte order at a specific position. Read more
source§fn read_i16be_at(&mut self, pos: u64) -> Result<i16>
fn read_i16be_at(&mut self, pos: u64) -> Result<i16>
Reads a signed 16-bit integer in big-endian byte order at a specific position. Read more
source§fn read_i32le_at(&mut self, pos: u64) -> Result<i32>
fn read_i32le_at(&mut self, pos: u64) -> Result<i32>
Reads a signed 32-bit integer in little-endian byte order at a specific position. Read more
source§fn read_i32be_at(&mut self, pos: u64) -> Result<i32>
fn read_i32be_at(&mut self, pos: u64) -> Result<i32>
Reads a signed 32-bit integer in big-endian byte order at a specific position. Read more
source§fn read_i64le_at(&mut self, pos: u64) -> Result<i64>
fn read_i64le_at(&mut self, pos: u64) -> Result<i64>
Reads a signed 64-bit integer in little-endian byte order at a specific position. Read more
source§fn read_i64be_at(&mut self, pos: u64) -> Result<i64>
fn read_i64be_at(&mut self, pos: u64) -> Result<i64>
Reads a signed 64-bit integer in big-endian byte order at a specific position. Read more
source§fn read_i128le_at(&mut self, pos: u64) -> Result<i128>
fn read_i128le_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 128-bit integer in little-endian byte order at a specific position. Read more
source§fn read_i128be_at(&mut self, pos: u64) -> Result<i128>
fn read_i128be_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 128-bit integer in big-endian byte order at a specific position. Read more
source§fn read_vi7_at(&mut self, pos: u64) -> Result<i128>
fn read_vi7_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 7-bit variable-length integer at a specific position. Read more
source§fn read_vi7r_at(&mut self, pos: u64) -> Result<i128>
fn read_vi7r_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 7-bit variable-length integer in reversed byte order at a specific position. Read more
source§fn read_vi15le_at(&mut self, pos: u64) -> Result<i128>
fn read_vi15le_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 15-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn read_vi15be_at(&mut self, pos: u64) -> Result<i128>
fn read_vi15be_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 15-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn read_vi15ler_at(&mut self, pos: u64) -> Result<i128>
fn read_vi15ler_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 15-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn read_vi15ber_at(&mut self, pos: u64) -> Result<i128>
fn read_vi15ber_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 15-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn read_vi31le_at(&mut self, pos: u64) -> Result<i128>
fn read_vi31le_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 31-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn read_vi31be_at(&mut self, pos: u64) -> Result<i128>
fn read_vi31be_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 31-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn read_vi31ler_at(&mut self, pos: u64) -> Result<i128>
fn read_vi31ler_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 31-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn read_vi31ber_at(&mut self, pos: u64) -> Result<i128>
fn read_vi31ber_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 31-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn read_vi63le_at(&mut self, pos: u64) -> Result<i128>
fn read_vi63le_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 63-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn read_vi63be_at(&mut self, pos: u64) -> Result<i128>
fn read_vi63be_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 63-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn read_vi63ler_at(&mut self, pos: u64) -> Result<i128>
fn read_vi63ler_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 63-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn read_vi63ber_at(&mut self, pos: u64) -> Result<i128>
fn read_vi63ber_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 63-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn read_vi127le_at(&mut self, pos: u64) -> Result<i128>
fn read_vi127le_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 127-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn read_vi127be_at(&mut self, pos: u64) -> Result<i128>
fn read_vi127be_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 127-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn read_vi127ler_at(&mut self, pos: u64) -> Result<i128>
fn read_vi127ler_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 127-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn read_vi127ber_at(&mut self, pos: u64) -> Result<i128>
fn read_vi127ber_at(&mut self, pos: u64) -> Result<i128>
Reads a signed 127-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn read_ixle_at(&mut self, pos: u64, size: u8) -> Result<i128>
fn read_ixle_at(&mut self, pos: u64, size: u8) -> Result<i128>
Reads a signed integer in little-endian byte order at a specific position. Read more
source§fn read_ixbe_at(&mut self, pos: u64, size: u8) -> Result<i128>
fn read_ixbe_at(&mut self, pos: u64, size: u8) -> Result<i128>
Reads a signed integer in big-endian byte order at a specific position. Read more
source§fn read_vixle_at(&mut self, pos: u64, size: u8) -> Result<i128>
fn read_vixle_at(&mut self, pos: u64, size: u8) -> Result<i128>
Reads a signed variable-length integer in little-endian byte order at a specific position. Read more
source§fn read_vixbe_at(&mut self, pos: u64, size: u8) -> Result<i128>
fn read_vixbe_at(&mut self, pos: u64, size: u8) -> Result<i128>
Reads a signed variable-length integer in big-endian byte order at a specific position. Read more
source§fn read_vixler_at(&mut self, pos: u64, size: u8) -> Result<i128>
fn read_vixler_at(&mut self, pos: u64, size: u8) -> Result<i128>
Reads a signed variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn read_vixber_at(&mut self, pos: u64, size: u8) -> Result<i128>
fn read_vixber_at(&mut self, pos: u64, size: u8) -> Result<i128>
Reads a signed variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn copy(
&mut self,
length: u64,
target: &mut dyn Writable<'a>,
buffer_size: u64,
) -> Result<()>
fn copy( &mut self, length: u64, target: &mut dyn Writable<'a>, buffer_size: u64, ) -> Result<()>
Copies data from the current position to a target. Read more
source§fn copy_to(
&mut self,
target_pos: u64,
length: u64,
target: &mut dyn Writable<'a>,
buffer_size: u64,
) -> Result<()>
fn copy_to( &mut self, target_pos: u64, length: u64, target: &mut dyn Writable<'a>, buffer_size: u64, ) -> Result<()>
Copies data from the current position to a target to a specific position. Read more
source§fn read_bytes(&mut self, length: u64) -> Result<Vec<u8>>
fn read_bytes(&mut self, length: u64) -> Result<Vec<u8>>
Reads bytes at the current position. Read more
source§fn read_utf8(&mut self, length: u64) -> Result<String>
fn read_utf8(&mut self, length: u64) -> Result<String>
Reads an UTF-8-encoded string at the current position. Read more
source§fn read_u8(&mut self) -> Result<u8>
fn read_u8(&mut self) -> Result<u8>
Reads an unsigned 8-bit integer at the current position. Read more
source§fn read_u16le(&mut self) -> Result<u16>
fn read_u16le(&mut self) -> Result<u16>
Reads an unsigned 16-bit integer in little-endian byte order at the current position. Read more
source§fn read_u16be(&mut self) -> Result<u16>
fn read_u16be(&mut self) -> Result<u16>
Reads an unsigned 16-bit integer in big-endian byte order at the current position. Read more
source§fn read_u32le(&mut self) -> Result<u32>
fn read_u32le(&mut self) -> Result<u32>
Reads an unsigned 32-bit integer in little-endian byte order at the current position. Read more
source§fn read_u32be(&mut self) -> Result<u32>
fn read_u32be(&mut self) -> Result<u32>
Reads an unsigned 32-bit integer in big-endian byte order at the current position. Read more
source§fn read_u64le(&mut self) -> Result<u64>
fn read_u64le(&mut self) -> Result<u64>
Reads an unsigned 64-bit integer in little-endian byte order at the current position. Read more
source§fn read_u64be(&mut self) -> Result<u64>
fn read_u64be(&mut self) -> Result<u64>
Reads an unsigned 64-bit integer in big-endian byte order at the current position. Read more
source§fn read_u128le(&mut self) -> Result<u128>
fn read_u128le(&mut self) -> Result<u128>
Reads an unsigned 128-bit integer in little-endian byte order at the current position. Read more
source§fn read_u128be(&mut self) -> Result<u128>
fn read_u128be(&mut self) -> Result<u128>
Reads an unsigned 128-bit integer in big-endian byte order at the current position. Read more
source§fn read_vu7(&mut self) -> Result<u128>
fn read_vu7(&mut self) -> Result<u128>
Reads an unsigned 7-bit variable-length integer at the current position. Read more
source§fn read_vu7r(&mut self) -> Result<u128>
fn read_vu7r(&mut self) -> Result<u128>
Reads an unsigned 7-bit variable-length integer in reversed byte order at the current position. Read more
source§fn read_vu15le(&mut self) -> Result<u128>
fn read_vu15le(&mut self) -> Result<u128>
Reads an unsigned 15-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn read_vu15be(&mut self) -> Result<u128>
fn read_vu15be(&mut self) -> Result<u128>
Reads an unsigned 15-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn read_vu15ler(&mut self) -> Result<u128>
fn read_vu15ler(&mut self) -> Result<u128>
Reads an unsigned 15-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn read_vu15ber(&mut self) -> Result<u128>
fn read_vu15ber(&mut self) -> Result<u128>
Reads an unsigned 15-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn read_vu31le(&mut self) -> Result<u128>
fn read_vu31le(&mut self) -> Result<u128>
Reads an unsigned 31-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn read_vu31be(&mut self) -> Result<u128>
fn read_vu31be(&mut self) -> Result<u128>
Reads an unsigned 31-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn read_vu31ler(&mut self) -> Result<u128>
fn read_vu31ler(&mut self) -> Result<u128>
Reads an unsigned 31-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn read_vu31ber(&mut self) -> Result<u128>
fn read_vu31ber(&mut self) -> Result<u128>
Reads an unsigned 31-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn read_vu63le(&mut self) -> Result<u128>
fn read_vu63le(&mut self) -> Result<u128>
Reads an unsigned 63-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn read_vu63be(&mut self) -> Result<u128>
fn read_vu63be(&mut self) -> Result<u128>
Reads an unsigned 63-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn read_vu63ler(&mut self) -> Result<u128>
fn read_vu63ler(&mut self) -> Result<u128>
Reads an unsigned 63-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn read_vu63ber(&mut self) -> Result<u128>
fn read_vu63ber(&mut self) -> Result<u128>
Reads an unsigned 63-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn read_vu127le(&mut self) -> Result<u128>
fn read_vu127le(&mut self) -> Result<u128>
Reads an unsigned 127-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn read_vu127be(&mut self) -> Result<u128>
fn read_vu127be(&mut self) -> Result<u128>
Reads an unsigned 127-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn read_vu127ler(&mut self) -> Result<u128>
fn read_vu127ler(&mut self) -> Result<u128>
Reads an unsigned 127-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn read_vu127ber(&mut self) -> Result<u128>
fn read_vu127ber(&mut self) -> Result<u128>
Reads an unsigned 127-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn read_uxle(&mut self, size: u8) -> Result<u128>
fn read_uxle(&mut self, size: u8) -> Result<u128>
Reads an unsigned integer in little-endian byte order at the current position. Read more
source§fn read_uxbe(&mut self, size: u8) -> Result<u128>
fn read_uxbe(&mut self, size: u8) -> Result<u128>
Reads an unsigned integer in big-endian byte order at the current position. Read more
source§fn read_vuxle(&mut self, size: u8) -> Result<u128>
fn read_vuxle(&mut self, size: u8) -> Result<u128>
Reads an unsigned variable-length integer in little-endian byte order at the current position. Read more
source§fn read_vuxbe(&mut self, size: u8) -> Result<u128>
fn read_vuxbe(&mut self, size: u8) -> Result<u128>
Reads an unsigned variable-length integer in big-endian byte order at the current position. Read more
source§fn read_vuxler(&mut self, size: u8) -> Result<u128>
fn read_vuxler(&mut self, size: u8) -> Result<u128>
Reads an unsigned variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn read_vuxber(&mut self, size: u8) -> Result<u128>
fn read_vuxber(&mut self, size: u8) -> Result<u128>
Reads an unsigned variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn read_i8(&mut self) -> Result<i8>
fn read_i8(&mut self) -> Result<i8>
Reads a signed 8-bit integer at the current position. Read more
source§fn read_i16le(&mut self) -> Result<i16>
fn read_i16le(&mut self) -> Result<i16>
Reads a signed 16-bit integer in little-endian byte order at the current position. Read more
source§fn read_i16be(&mut self) -> Result<i16>
fn read_i16be(&mut self) -> Result<i16>
Reads a signed 16-bit integer in big-endian byte order at the current position. Read more
source§fn read_i32le(&mut self) -> Result<i32>
fn read_i32le(&mut self) -> Result<i32>
Reads a signed 32-bit integer in little-endian byte order at the current position. Read more
source§fn read_i32be(&mut self) -> Result<i32>
fn read_i32be(&mut self) -> Result<i32>
Reads a signed 32-bit integer in big-endian byte order at the current position. Read more
source§fn read_i64le(&mut self) -> Result<i64>
fn read_i64le(&mut self) -> Result<i64>
Reads a signed 64-bit integer in little-endian byte order at the current position. Read more
source§fn read_i64be(&mut self) -> Result<i64>
fn read_i64be(&mut self) -> Result<i64>
Reads a signed 64-bit integer in big-endian byte order at the current position. Read more
source§fn read_i128le(&mut self) -> Result<i128>
fn read_i128le(&mut self) -> Result<i128>
Reads a signed 128-bit integer in little-endian byte order at the current position. Read more
source§fn read_i128be(&mut self) -> Result<i128>
fn read_i128be(&mut self) -> Result<i128>
Reads a signed 128-bit integer in big-endian byte order at the current position. Read more
source§fn read_vi7(&mut self) -> Result<i128>
fn read_vi7(&mut self) -> Result<i128>
Reads a signed 7-bit variable-length integer at the current position. Read more
source§fn read_vi7r(&mut self) -> Result<i128>
fn read_vi7r(&mut self) -> Result<i128>
Reads a signed 7-bit variable-length integer in reversed byte order at the current position. Read more
source§fn read_vi15le(&mut self) -> Result<i128>
fn read_vi15le(&mut self) -> Result<i128>
Reads a signed 15-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn read_vi15be(&mut self) -> Result<i128>
fn read_vi15be(&mut self) -> Result<i128>
Reads a signed 15-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn read_vi15ler(&mut self) -> Result<i128>
fn read_vi15ler(&mut self) -> Result<i128>
Reads a signed 15-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn read_vi15ber(&mut self) -> Result<i128>
fn read_vi15ber(&mut self) -> Result<i128>
Reads a signed 15-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn read_vi31le(&mut self) -> Result<i128>
fn read_vi31le(&mut self) -> Result<i128>
Reads a signed 31-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn read_vi31be(&mut self) -> Result<i128>
fn read_vi31be(&mut self) -> Result<i128>
Reads a signed 31-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn read_vi31ler(&mut self) -> Result<i128>
fn read_vi31ler(&mut self) -> Result<i128>
Reads a signed 31-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn read_vi31ber(&mut self) -> Result<i128>
fn read_vi31ber(&mut self) -> Result<i128>
Reads a signed 31-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn read_vi63le(&mut self) -> Result<i128>
fn read_vi63le(&mut self) -> Result<i128>
Reads a signed 63-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn read_vi63be(&mut self) -> Result<i128>
fn read_vi63be(&mut self) -> Result<i128>
Reads a signed 63-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn read_vi63ler(&mut self) -> Result<i128>
fn read_vi63ler(&mut self) -> Result<i128>
Reads a signed 63-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn read_vi63ber(&mut self) -> Result<i128>
fn read_vi63ber(&mut self) -> Result<i128>
Reads a signed 63-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn read_vi127le(&mut self) -> Result<i128>
fn read_vi127le(&mut self) -> Result<i128>
Reads a signed 127-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn read_vi127be(&mut self) -> Result<i128>
fn read_vi127be(&mut self) -> Result<i128>
Reads a signed 127-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn read_vi127ler(&mut self) -> Result<i128>
fn read_vi127ler(&mut self) -> Result<i128>
Reads a signed 127-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn read_vi127ber(&mut self) -> Result<i128>
fn read_vi127ber(&mut self) -> Result<i128>
Reads a signed 127-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn read_ixle(&mut self, size: u8) -> Result<i128>
fn read_ixle(&mut self, size: u8) -> Result<i128>
Reads a signed integer in little-endian byte order at the current position. Read more
source§fn read_ixbe(&mut self, size: u8) -> Result<i128>
fn read_ixbe(&mut self, size: u8) -> Result<i128>
Reads a signed integer in big-endian byte order at the current position. Read more
source§fn read_vixle(&mut self, size: u8) -> Result<i128>
fn read_vixle(&mut self, size: u8) -> Result<i128>
Reads a signed variable-length integer in little-endian byte order at the current position. Read more
source§fn read_vixbe(&mut self, size: u8) -> Result<i128>
fn read_vixbe(&mut self, size: u8) -> Result<i128>
Reads a signed variable-length integer in big-endian byte order at the current position. Read more
source§impl<'a> Seek for RLimited<'a>
impl<'a> Seek for RLimited<'a>
source§fn seek(&mut self, pos: SeekFrom) -> Result<u64>
fn seek(&mut self, pos: SeekFrom) -> Result<u64>
Seek to an offset, in bytes, in a stream. Read more
1.55.0 · source§fn rewind(&mut self) -> Result<(), Error>
fn rewind(&mut self) -> Result<(), Error>
Rewind to the beginning of a stream. Read more
source§fn stream_len(&mut self) -> Result<u64, Error>
fn stream_len(&mut self) -> Result<u64, Error>
🔬This is a nightly-only experimental API. (
seek_stream_len)Returns the length of this stream (in bytes). Read more
source§impl<'a> Seekable for RLimited<'a>
impl<'a> Seekable for RLimited<'a>
source§fn end(&mut self) -> Result<u64>
fn end(&mut self) -> Result<u64>
Sets the stream position to the end. It is not recommended to read anything after this because it would result in an EOF error. Read more
source§fn to(&mut self, pos: u64) -> Result<u64>
fn to(&mut self, pos: u64) -> Result<u64>
Sets the stream position to a specific position. Read more
source§fn jump(&mut self, pos: i64) -> Result<u64>
fn jump(&mut self, pos: i64) -> Result<u64>
Jumps a specific amount of bytes from the current position. Read more
Auto Trait Implementations§
impl<'a> Freeze for RLimited<'a>
impl<'a> !RefUnwindSafe for RLimited<'a>
impl<'a> !Send for RLimited<'a>
impl<'a> !Sync for RLimited<'a>
impl<'a> Unpin for RLimited<'a>
impl<'a> !UnwindSafe for RLimited<'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