dh

Struct WLimited

source
pub struct WLimited<'a> { /* private fields */ }
Expand description

A limited writer.

See Writable::limit for more information.

Trait Implementations§

source§

impl<'a> Seek for WLimited<'a>

source§

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>

Rewind to the beginning of a stream. Read more
source§

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
1.51.0 · source§

fn stream_position(&mut self) -> Result<u64, Error>

Returns the current seek position from the start of the stream. Read more
1.80.0 · source§

fn seek_relative(&mut self, offset: i64) -> Result<(), Error>

Seeks relative to the current position. Read more
source§

impl<'a> Seekable for WLimited<'a>

source§

fn rewind(&mut self) -> Result<u64>

Sets the stream position to the beginning. This is the same as calling to with 0. Read more
source§

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>

Sets the stream position to a specific position. Read more
source§

fn jump(&mut self, pos: i64) -> Result<u64>

Jumps a specific amount of bytes from the current position. Read more
source§

fn size(&mut self) -> Result<u64>

Calculates the current size of the source. Please call this method as less as possible because it moves to the end of the stream and back to the previous position. If you need to know the size of the source, consider storing it in a variable. Read more
source§

fn pos(&mut self) -> Result<u64>

Returns the current position of the stream. Read more
source§

impl<'a> Writable<'a> for WLimited<'a>

source§

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<()>

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<()>

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<()>

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>>>

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>>

Limits the space the writer can write to. Read more
source§

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<()>

Writes an UTF-8-encoded string at a specific position. Read more
source§

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

Writes a signed 8-bit integer at a specific position. Read more
source§

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

Writes bytes at the current position. Read more
source§

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<()>

Writes an unsigned 8-bit integer at the current position. Read more
source§

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

Writes an unsigned 7-bit variable-length integer at the current position. Read more
source§

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

Writes a signed 8-bit integer at the current position. Read more
source§

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

Writes a signed 7-bit variable-length integer at the current position. Read more
source§

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

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<()>

Writes a signed variable-length integer in big-endian byte order at the current position. Read more
source§

fn write_vixler(&mut self, size: u8, num: i128) -> Result<()>

Writes a signed variable-length integer in reversed little-endian byte order at the current position. Read more
source§

fn write_vixber(&mut self, size: u8, num: i128) -> Result<()>

Writes a signed variable-length integer in reversed big-endian byte order at the current position. Read more
source§

impl<'a> Write for WLimited<'a>

source§

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<()>

Flushes this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
1.36.0 · source§

fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>

Like write, except that it writes from a slice of buffers. Read more
source§

fn is_write_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored implementation. Read more
1.0.0 · source§

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>

🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
1.0.0 · source§

fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>

Writes a formatted string into this writer, returning any error encountered. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a “by reference” adapter for this instance of Write. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for WLimited<'a>

§

impl<'a> !RefUnwindSafe for WLimited<'a>

§

impl<'a> !Send for WLimited<'a>

§

impl<'a> !Sync for WLimited<'a>

§

impl<'a> Unpin for WLimited<'a>

§

impl<'a> !UnwindSafe for WLimited<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.