pub struct RwLimited<'a> { /* private fields */ }Expand description
A limited R/W stream.
See Rw::rw_limit for more information.
Trait Implementations§
source§impl<'a> Read for RwLimited<'a>
impl<'a> Read for RwLimited<'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 RwLimited<'a>
impl<'a> Readable<'a> for RwLimited<'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> Rw<'a> for RwLimited<'a>
impl<'a> Rw<'a> for RwLimited<'a>
source§fn rw_as_trait(&mut self) -> &mut dyn Rw<'a>
fn rw_as_trait(&mut self) -> &mut dyn Rw<'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§impl<'a> Seek for RwLimited<'a>
impl<'a> Seek for RwLimited<'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 RwLimited<'a>
impl<'a> Seekable for RwLimited<'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
source§impl<'a> Writable<'a> for RwLimited<'a>
impl<'a> Writable<'a> for RwLimited<'a>
source§fn as_trait(&mut self) -> &mut dyn Writable<'a>
fn as_trait(&mut self) -> &mut dyn Writable<'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 alloc(&mut self, _: u64) -> Result<()>
fn alloc(&mut self, _: u64) -> Result<()>
Pre-allocates space in the data stream.
This is useful when you know the size of the data you are going to write and want to avoid reallocations for performance reasons.
Also, you can guarantee that the data will fit in the stream. 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<WLimited<'a>>
fn limit(&'a mut self, pos: u64, length: u64) -> Result<WLimited<'a>>
Limits the space the writer can write to. Read more
source§fn write_bytes_at(&mut self, pos: u64, buf: &[u8]) -> Result<()>
fn write_bytes_at(&mut self, pos: u64, buf: &[u8]) -> Result<()>
Writes bytes at a specific position. Read more
source§fn write_utf8_at(&mut self, pos: u64, s: &String) -> Result<()>
fn write_utf8_at(&mut self, pos: u64, s: &String) -> Result<()>
Writes an UTF-8-encoded string at a specific position. Read more
source§fn write_u8_at(&mut self, pos: u64, num: u8) -> Result<()>
fn write_u8_at(&mut self, pos: u64, num: u8) -> Result<()>
Writes an unsigned 8-bit integer at a specific position. Read more
source§fn write_u16le_at(&mut self, pos: u64, num: u16) -> Result<()>
fn write_u16le_at(&mut self, pos: u64, num: u16) -> Result<()>
Writes an unsigned 16-bit integer in little-endian byte order at a specific position. Read more
source§fn write_u16be_at(&mut self, pos: u64, num: u16) -> Result<()>
fn write_u16be_at(&mut self, pos: u64, num: u16) -> Result<()>
Writes an unsigned 16-bit integer in big-endian byte order at a specific position. Read more
source§fn write_u32le_at(&mut self, pos: u64, num: u32) -> Result<()>
fn write_u32le_at(&mut self, pos: u64, num: u32) -> Result<()>
Writes an unsigned 32-bit integer in little-endian byte order at a specific position. Read more
source§fn write_u32be_at(&mut self, pos: u64, num: u32) -> Result<()>
fn write_u32be_at(&mut self, pos: u64, num: u32) -> Result<()>
Writes an unsigned 32-bit integer in big-endian byte order at a specific position. Read more
source§fn write_u64le_at(&mut self, pos: u64, num: u64) -> Result<()>
fn write_u64le_at(&mut self, pos: u64, num: u64) -> Result<()>
Writes an unsigned 64-bit integer in little-endian byte order at a specific position. Read more
source§fn write_u64be_at(&mut self, pos: u64, num: u64) -> Result<()>
fn write_u64be_at(&mut self, pos: u64, num: u64) -> Result<()>
Writes an unsigned 64-bit integer in big-endian byte order at a specific position. Read more
source§fn write_u128le_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_u128le_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 128-bit integer in little-endian byte order at a specific position. Read more
source§fn write_u128be_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_u128be_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 128-bit integer in big-endian byte order at a specific position. Read more
source§fn write_vu7_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu7_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 7-bit variable-length integer at a specific position. Read more
source§fn write_vu7r_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu7r_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 7-bit variable-length integer in reversed byte order at a specific position. Read more
source§fn write_vu15le_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu15le_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 15-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn write_vu15be_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu15be_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 15-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn write_vu15ler_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu15ler_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 15-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn write_vu15ber_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu15ber_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 15-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn write_vu31le_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu31le_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 31-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn write_vu31be_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu31be_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 31-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn write_vu31ler_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu31ler_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 31-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn write_vu31ber_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu31ber_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 31-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn write_vu63le_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu63le_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 63-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn write_vu63be_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu63be_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 63-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn write_vu63ler_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu63ler_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 63-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn write_vu63ber_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu63ber_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 63-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn write_vu127le_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu127le_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 127-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn write_vu127be_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu127be_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 127-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn write_vu127ler_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu127ler_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 127-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn write_vu127ber_at(&mut self, pos: u64, num: u128) -> Result<()>
fn write_vu127ber_at(&mut self, pos: u64, num: u128) -> Result<()>
Writes an unsigned 127-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn write_uxle_at(&mut self, pos: u64, size: u8, num: u128) -> Result<()>
fn write_uxle_at(&mut self, pos: u64, size: u8, num: u128) -> Result<()>
Writes an unsigned integer in little-endian byte order at a specific position. Read more
source§fn write_uxbe_at(&mut self, pos: u64, size: u8, num: u128) -> Result<()>
fn write_uxbe_at(&mut self, pos: u64, size: u8, num: u128) -> Result<()>
Writes an unsigned integer in big-endian byte order at a specific position. Read more
source§fn write_vuxle_at(&mut self, pos: u64, size: u8, num: u128) -> Result<()>
fn write_vuxle_at(&mut self, pos: u64, size: u8, num: u128) -> Result<()>
Writes an unsigned variable-length integer in little-endian byte order at a specific position. Read more
source§fn write_vuxbe_at(&mut self, pos: u64, size: u8, num: u128) -> Result<()>
fn write_vuxbe_at(&mut self, pos: u64, size: u8, num: u128) -> Result<()>
Writes an unsigned variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn write_vuxler_at(&mut self, pos: u64, size: u8, num: u128) -> Result<()>
fn write_vuxler_at(&mut self, pos: u64, size: u8, num: u128) -> Result<()>
Writes an unsigned variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn write_vuxber_at(&mut self, pos: u64, size: u8, num: u128) -> Result<()>
fn write_vuxber_at(&mut self, pos: u64, size: u8, num: u128) -> Result<()>
Writes an unsigned variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn write_i8_at(&mut self, pos: u64, num: i8) -> Result<()>
fn write_i8_at(&mut self, pos: u64, num: i8) -> Result<()>
Writes a signed 8-bit integer at a specific position. Read more
source§fn write_i16le_at(&mut self, pos: u64, num: i16) -> Result<()>
fn write_i16le_at(&mut self, pos: u64, num: i16) -> Result<()>
Writes a signed 16-bit integer in little-endian byte order at a specific position. Read more
source§fn write_i16be_at(&mut self, pos: u64, num: i16) -> Result<()>
fn write_i16be_at(&mut self, pos: u64, num: i16) -> Result<()>
Writes a signed 16-bit integer in big-endian byte order at a specific position. Read more
source§fn write_i32le_at(&mut self, pos: u64, num: i32) -> Result<()>
fn write_i32le_at(&mut self, pos: u64, num: i32) -> Result<()>
Writes a signed 32-bit integer in little-endian byte order at a specific position. Read more
source§fn write_i32be_at(&mut self, pos: u64, num: i32) -> Result<()>
fn write_i32be_at(&mut self, pos: u64, num: i32) -> Result<()>
Writes a signed 32-bit integer in big-endian byte order at a specific position. Read more
source§fn write_i64le_at(&mut self, pos: u64, num: i64) -> Result<()>
fn write_i64le_at(&mut self, pos: u64, num: i64) -> Result<()>
Writes a signed 64-bit integer in little-endian byte order at a specific position. Read more
source§fn write_i64be_at(&mut self, pos: u64, num: i64) -> Result<()>
fn write_i64be_at(&mut self, pos: u64, num: i64) -> Result<()>
Writes a signed 64-bit integer in big-endian byte order at a specific position. Read more
source§fn write_i128le_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_i128le_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 128-bit integer in little-endian byte order at a specific position. Read more
source§fn write_i128be_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_i128be_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 128-bit integer in big-endian byte order at a specific position. Read more
source§fn write_vi7_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi7_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 7-bit variable-length integer at a specific position. Read more
source§fn write_vi7r_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi7r_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 7-bit variable-length integer in reversed byte order at a specific position. Read more
source§fn write_vi15le_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi15le_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 15-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn write_vi15be_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi15be_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 15-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn write_vi15ler_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi15ler_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 15-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn write_vi15ber_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi15ber_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 15-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn write_vi31le_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi31le_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 31-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn write_vi31be_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi31be_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 31-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn write_vi31ler_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi31ler_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 31-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn write_vi31ber_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi31ber_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 31-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn write_vi63le_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi63le_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 63-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn write_vi63be_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi63be_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 63-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn write_vi63ler_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi63ler_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 63-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn write_vi127le_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi127le_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 127-bit variable-length integer in little-endian byte order at a specific position. Read more
source§fn write_vi127be_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi127be_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 127-bit variable-length integer in big-endian byte order at a specific position. Read more
source§fn write_vi127ler_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi127ler_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 127-bit variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn write_vi127ber_at(&mut self, pos: u64, num: i128) -> Result<()>
fn write_vi127ber_at(&mut self, pos: u64, num: i128) -> Result<()>
Writes a signed 127-bit variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn write_ixle_at(&mut self, pos: u64, size: u8, num: i128) -> Result<()>
fn write_ixle_at(&mut self, pos: u64, size: u8, num: i128) -> Result<()>
Writes a signed integer in little-endian byte order at a specific position. Read more
source§fn write_ixbe_at(&mut self, pos: u64, size: u8, num: i128) -> Result<()>
fn write_ixbe_at(&mut self, pos: u64, size: u8, num: i128) -> Result<()>
Writes a signed integer in big-endian byte order at a specific position. Read more
source§fn write_vixle_at(&mut self, pos: u64, size: u8, num: i128) -> Result<()>
fn write_vixle_at(&mut self, pos: u64, size: u8, num: i128) -> Result<()>
Writes a signed variable-length integer in little-endian byte order at a specific position. Read more
source§fn write_vixbe_at(&mut self, pos: u64, size: u8, num: i128) -> Result<()>
fn write_vixbe_at(&mut self, pos: u64, size: u8, num: i128) -> Result<()>
Writes a signed variable-length integer in big-endian byte order at a specific position. Read more
source§fn write_vixler_at(&mut self, pos: u64, size: u8, num: i128) -> Result<()>
fn write_vixler_at(&mut self, pos: u64, size: u8, num: i128) -> Result<()>
Writes a signed variable-length integer in reversed little-endian byte order at a specific position. Read more
source§fn write_vixber_at(&mut self, pos: u64, size: u8, num: i128) -> Result<()>
fn write_vixber_at(&mut self, pos: u64, size: u8, num: i128) -> Result<()>
Writes a signed variable-length integer in reversed big-endian byte order at a specific position. Read more
source§fn write_bytes(&mut self, vec: &[u8]) -> Result<()>
fn write_bytes(&mut self, vec: &[u8]) -> Result<()>
Writes bytes at the current position. Read more
source§fn write_utf8(&mut self, s: &String) -> Result<()>
fn write_utf8(&mut self, s: &String) -> Result<()>
Writes an UTF-8-encoded string at the current position. Read more
source§fn write_u8(&mut self, num: u8) -> Result<()>
fn write_u8(&mut self, num: u8) -> Result<()>
Writes an unsigned 8-bit integer at the current position. Read more
source§fn write_u16le(&mut self, num: u16) -> Result<()>
fn write_u16le(&mut self, num: u16) -> Result<()>
Writes an unsigned 16-bit integer in little-endian byte order at the current position. Read more
source§fn write_u16be(&mut self, num: u16) -> Result<()>
fn write_u16be(&mut self, num: u16) -> Result<()>
Writes an unsigned 16-bit integer in big-endian byte order at the current position. Read more
source§fn write_u32le(&mut self, num: u32) -> Result<()>
fn write_u32le(&mut self, num: u32) -> Result<()>
Writes an unsigned 32-bit integer in little-endian byte order at the current position. Read more
source§fn write_u32be(&mut self, num: u32) -> Result<()>
fn write_u32be(&mut self, num: u32) -> Result<()>
Writes an unsigned 32-bit integer in big-endian byte order at the current position. Read more
source§fn write_u64le(&mut self, num: u64) -> Result<()>
fn write_u64le(&mut self, num: u64) -> Result<()>
Writes an unsigned 64-bit integer in little-endian byte order at the current position. Read more
source§fn write_u64be(&mut self, num: u64) -> Result<()>
fn write_u64be(&mut self, num: u64) -> Result<()>
Writes an unsigned 64-bit integer in big-endian byte order at the current position. Read more
source§fn write_u128le(&mut self, num: u128) -> Result<()>
fn write_u128le(&mut self, num: u128) -> Result<()>
Writes an unsigned 128-bit integer in little-endian byte order at the current position. Read more
source§fn write_u128be(&mut self, num: u128) -> Result<()>
fn write_u128be(&mut self, num: u128) -> Result<()>
Writes an unsigned 128-bit integer in big-endian byte order at the current position. Read more
source§fn write_vu7(&mut self, num: u128) -> Result<()>
fn write_vu7(&mut self, num: u128) -> Result<()>
Writes an unsigned 7-bit variable-length integer at the current position. Read more
source§fn write_vu7r(&mut self, num: u128) -> Result<()>
fn write_vu7r(&mut self, num: u128) -> Result<()>
Writes an unsigned 7-bit variable-length integer in reversed byte order at the current position. Read more
source§fn write_vu15le(&mut self, num: u128) -> Result<()>
fn write_vu15le(&mut self, num: u128) -> Result<()>
Writes an unsigned 15-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn write_vu15be(&mut self, num: u128) -> Result<()>
fn write_vu15be(&mut self, num: u128) -> Result<()>
Writes an unsigned 15-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn write_vu15ler(&mut self, num: u128) -> Result<()>
fn write_vu15ler(&mut self, num: u128) -> Result<()>
Writes an unsigned 15-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn write_vu15ber(&mut self, num: u128) -> Result<()>
fn write_vu15ber(&mut self, num: u128) -> Result<()>
Writes an unsigned 15-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn write_vu31le(&mut self, num: u128) -> Result<()>
fn write_vu31le(&mut self, num: u128) -> Result<()>
Writes an unsigned 31-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn write_vu31be(&mut self, num: u128) -> Result<()>
fn write_vu31be(&mut self, num: u128) -> Result<()>
Writes an unsigned 31-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn write_vu31ler(&mut self, num: u128) -> Result<()>
fn write_vu31ler(&mut self, num: u128) -> Result<()>
Writes an unsigned 31-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn write_vu31ber(&mut self, num: u128) -> Result<()>
fn write_vu31ber(&mut self, num: u128) -> Result<()>
Writes an unsigned 31-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn write_vu63le(&mut self, num: u128) -> Result<()>
fn write_vu63le(&mut self, num: u128) -> Result<()>
Writes an unsigned 63-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn write_vu63be(&mut self, num: u128) -> Result<()>
fn write_vu63be(&mut self, num: u128) -> Result<()>
Writes an unsigned 63-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn write_vu63ler(&mut self, num: u128) -> Result<()>
fn write_vu63ler(&mut self, num: u128) -> Result<()>
Writes an unsigned 63-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn write_vu63ber(&mut self, num: u128) -> Result<()>
fn write_vu63ber(&mut self, num: u128) -> Result<()>
Writes an unsigned 63-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn write_vu127le(&mut self, num: u128) -> Result<()>
fn write_vu127le(&mut self, num: u128) -> Result<()>
Writes an unsigned 127-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn write_vu127be(&mut self, num: u128) -> Result<()>
fn write_vu127be(&mut self, num: u128) -> Result<()>
Writes an unsigned 127-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn write_vu127ler(&mut self, num: u128) -> Result<()>
fn write_vu127ler(&mut self, num: u128) -> Result<()>
Writes an unsigned 127-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn write_vu127ber(&mut self, num: u128) -> Result<()>
fn write_vu127ber(&mut self, num: u128) -> Result<()>
Writes an unsigned 127-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn write_uxle(&mut self, size: u8, num: u128) -> Result<()>
fn write_uxle(&mut self, size: u8, num: u128) -> Result<()>
Writes an unsigned integer in little-endian byte order at the current position. Read more
source§fn write_uxbe(&mut self, size: u8, num: u128) -> Result<()>
fn write_uxbe(&mut self, size: u8, num: u128) -> Result<()>
Writes an unsigned integer in big-endian byte order at the current position. Read more
source§fn write_vuxle(&mut self, size: u8, num: u128) -> Result<()>
fn write_vuxle(&mut self, size: u8, num: u128) -> Result<()>
Writes an unsigned variable-length integer in little-endian byte order at the current position. Read more
source§fn write_vuxbe(&mut self, size: u8, num: u128) -> Result<()>
fn write_vuxbe(&mut self, size: u8, num: u128) -> Result<()>
Writes an unsigned variable-length integer in big-endian byte order at the current position. Read more
source§fn write_vuxler(&mut self, size: u8, num: u128) -> Result<()>
fn write_vuxler(&mut self, size: u8, num: u128) -> Result<()>
Writes an unsigned variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn write_vuxber(&mut self, size: u8, num: u128) -> Result<()>
fn write_vuxber(&mut self, size: u8, num: u128) -> Result<()>
Writes an unsigned variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn write_i8(&mut self, num: i8) -> Result<()>
fn write_i8(&mut self, num: i8) -> Result<()>
Writes a signed 8-bit integer at the current position. Read more
source§fn write_i16le(&mut self, num: i16) -> Result<()>
fn write_i16le(&mut self, num: i16) -> Result<()>
Writes a signed 16-bit integer in little-endian byte order at the current position. Read more
source§fn write_i16be(&mut self, num: i16) -> Result<()>
fn write_i16be(&mut self, num: i16) -> Result<()>
Writes a signed 16-bit integer in big-endian byte order at the current position. Read more
source§fn write_i32le(&mut self, num: i32) -> Result<()>
fn write_i32le(&mut self, num: i32) -> Result<()>
Writes a signed 32-bit integer in little-endian byte order at the current position. Read more
source§fn write_i32be(&mut self, num: i32) -> Result<()>
fn write_i32be(&mut self, num: i32) -> Result<()>
Writes a signed 32-bit integer in big-endian byte order at the current position. Read more
source§fn write_i64le(&mut self, num: i64) -> Result<()>
fn write_i64le(&mut self, num: i64) -> Result<()>
Writes a signed 64-bit integer in little-endian byte order at the current position. Read more
source§fn write_i64be(&mut self, num: i64) -> Result<()>
fn write_i64be(&mut self, num: i64) -> Result<()>
Writes a signed 64-bit integer in big-endian byte order at the current position. Read more
source§fn write_i128le(&mut self, num: i128) -> Result<()>
fn write_i128le(&mut self, num: i128) -> Result<()>
Writes a signed 128-bit integer in little-endian byte order at the current position. Read more
source§fn write_i128be(&mut self, num: i128) -> Result<()>
fn write_i128be(&mut self, num: i128) -> Result<()>
Writes a signed 128-bit integer in big-endian byte order at the current position. Read more
source§fn write_vi7(&mut self, num: i128) -> Result<()>
fn write_vi7(&mut self, num: i128) -> Result<()>
Writes a signed 7-bit variable-length integer at the current position. Read more
source§fn write_vi7r(&mut self, num: i128) -> Result<()>
fn write_vi7r(&mut self, num: i128) -> Result<()>
Writes a signed 7-bit variable-length integer in reversed byte order at the current position. Read more
source§fn write_vi15le(&mut self, num: i128) -> Result<()>
fn write_vi15le(&mut self, num: i128) -> Result<()>
Writes a signed 15-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn write_vi15be(&mut self, num: i128) -> Result<()>
fn write_vi15be(&mut self, num: i128) -> Result<()>
Writes a signed 15-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn write_vi15ler(&mut self, num: i128) -> Result<()>
fn write_vi15ler(&mut self, num: i128) -> Result<()>
Writes a signed 15-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn write_vi15ber(&mut self, num: i128) -> Result<()>
fn write_vi15ber(&mut self, num: i128) -> Result<()>
Writes a signed 15-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn write_vi31le(&mut self, num: i128) -> Result<()>
fn write_vi31le(&mut self, num: i128) -> Result<()>
Writes a signed 31-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn write_vi31be(&mut self, num: i128) -> Result<()>
fn write_vi31be(&mut self, num: i128) -> Result<()>
Writes a signed 31-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn write_vi31ler(&mut self, num: i128) -> Result<()>
fn write_vi31ler(&mut self, num: i128) -> Result<()>
Writes a signed 31-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn write_vi31ber(&mut self, num: i128) -> Result<()>
fn write_vi31ber(&mut self, num: i128) -> Result<()>
Writes a signed 31-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn write_vi63le(&mut self, num: i128) -> Result<()>
fn write_vi63le(&mut self, num: i128) -> Result<()>
Writes a signed 63-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn write_vi63be(&mut self, num: i128) -> Result<()>
fn write_vi63be(&mut self, num: i128) -> Result<()>
Writes a signed 63-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn write_vi63ler(&mut self, num: i128) -> Result<()>
fn write_vi63ler(&mut self, num: i128) -> Result<()>
Writes a signed 63-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn write_vi63ber(&mut self, num: i128) -> Result<()>
fn write_vi63ber(&mut self, num: i128) -> Result<()>
Writes a signed 63-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn write_vi127le(&mut self, num: i128) -> Result<()>
fn write_vi127le(&mut self, num: i128) -> Result<()>
Writes a signed 127-bit variable-length integer in little-endian byte order at the current position. Read more
source§fn write_vi127be(&mut self, num: i128) -> Result<()>
fn write_vi127be(&mut self, num: i128) -> Result<()>
Writes a signed 127-bit variable-length integer in big-endian byte order at the current position. Read more
source§fn write_vi127ler(&mut self, num: i128) -> Result<()>
fn write_vi127ler(&mut self, num: i128) -> Result<()>
Writes a signed 127-bit variable-length integer in reversed little-endian byte order at the current position. Read more
source§fn write_vi127ber(&mut self, num: i128) -> Result<()>
fn write_vi127ber(&mut self, num: i128) -> Result<()>
Writes a signed 127-bit variable-length integer in reversed big-endian byte order at the current position. Read more
source§fn write_ixle(&mut self, size: u8, num: i128) -> Result<()>
fn write_ixle(&mut self, size: u8, num: i128) -> Result<()>
Writes a signed integer in little-endian byte order at the current position. Read more
source§fn write_ixbe(&mut self, size: u8, num: i128) -> Result<()>
fn write_ixbe(&mut self, size: u8, num: i128) -> Result<()>
Writes a signed integer in big-endian byte order at the current position. Read more
source§fn write_vixle(&mut self, size: u8, num: i128) -> Result<()>
fn write_vixle(&mut self, size: u8, num: i128) -> Result<()>
Writes a signed variable-length integer in little-endian byte order at the current position. Read more
source§fn write_vixbe(&mut self, size: u8, num: i128) -> Result<()>
fn write_vixbe(&mut self, size: u8, num: i128) -> Result<()>
Writes a signed variable-length integer in big-endian byte order at the current position. Read more
source§impl<'a> Write for RwLimited<'a>
impl<'a> Write for RwLimited<'a>
source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector)1.0.0 · source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations§
impl<'a> Freeze for RwLimited<'a>
impl<'a> !RefUnwindSafe for RwLimited<'a>
impl<'a> !Send for RwLimited<'a>
impl<'a> !Sync for RwLimited<'a>
impl<'a> Unpin for RwLimited<'a>
impl<'a> !UnwindSafe for RwLimited<'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