BufWriter

Trait BufWriter 

Source
pub trait BufWriter {
Show 13 methods // Required method fn put_slice(&mut self, slice: &[u8]); // Provided methods fn put_u8(&mut self, val: u8) { ... } fn put_u16(&mut self, val: u16) { ... } fn put_u32(&mut self, val: u32) { ... } fn put_u64(&mut self, val: u64) { ... } fn put_u128(&mut self, val: u128) { ... } fn put_u256(&mut self, val: U256) { ... } fn put_i8(&mut self, val: i8) { ... } fn put_i16(&mut self, val: i16) { ... } fn put_i32(&mut self, val: i32) { ... } fn put_i64(&mut self, val: i64) { ... } fn put_i128(&mut self, val: i128) { ... } fn put_i256(&mut self, val: I256) { ... }
}
Expand description

A buffered writer of some kind.

Required Methods§

Source

fn put_slice(&mut self, slice: &[u8])

Writes the slice to the buffer.

This is the only method implementations are required to define. All other methods are provided.

Provided Methods§

Source

fn put_u8(&mut self, val: u8)

Writes a u8 to the buffer in little-endian (LE) encoding.

Source

fn put_u16(&mut self, val: u16)

Writes a u16 to the buffer in little-endian (LE) encoding.

Source

fn put_u32(&mut self, val: u32)

Writes a u32 to the buffer in little-endian (LE) encoding.

Source

fn put_u64(&mut self, val: u64)

Writes a u64 to the buffer in little-endian (LE) encoding.

Source

fn put_u128(&mut self, val: u128)

Writes a u128 to the buffer in little-endian (LE) encoding.

Source

fn put_u256(&mut self, val: U256)

Writes a u256 to the buffer in little-endian (LE) encoding.

Source

fn put_i8(&mut self, val: i8)

Writes an i8 to the buffer in little-endian (LE) encoding.

Source

fn put_i16(&mut self, val: i16)

Writes an i16 to the buffer in little-endian (LE) encoding.

Source

fn put_i32(&mut self, val: i32)

Writes an i32 to the buffer in little-endian (LE) encoding.

Source

fn put_i64(&mut self, val: i64)

Writes an i64 to the buffer in little-endian (LE) encoding.

Source

fn put_i128(&mut self, val: i128)

Writes an i128 to the buffer in little-endian (LE) encoding.

Source

fn put_i256(&mut self, val: I256)

Writes an i256 to the buffer in little-endian (LE) encoding.

Implementations on Foreign Types§

Source§

impl BufWriter for &mut [u8]

Source§

fn put_slice(&mut self, slice: &[u8])

Source§

impl BufWriter for Vec<u8>

Source§

fn put_slice(&mut self, slice: &[u8])

Source§

impl BufWriter for BytesMut

Source§

fn put_slice(&mut self, slice: &[u8])

Implementors§

Source§

impl BufWriter for CountWriter

Source§

impl<W1, W2> BufWriter for TeeWriter<W1, W2>
where W1: BufWriter, W2: BufWriter,