Trait simple_bytes::BytesWrite [−][src]
pub trait BytesWrite {
Show methods
fn as_mut(&mut self) -> &mut [u8];
fn as_bytes(&self) -> Bytes<'_>;
fn remaining_mut(&mut self) -> &mut [u8];
fn write(&mut self, slice: &[u8]);
fn write_u8(&mut self, num: u8) { ... }
fn write_u16(&mut self, num: u16) { ... }
fn write_u32(&mut self, num: u32) { ... }
fn write_u64(&mut self, num: u64) { ... }
fn write_u128(&mut self, num: u128) { ... }
fn write_i8(&mut self, num: i8) { ... }
fn write_i16(&mut self, num: i16) { ... }
fn write_i32(&mut self, num: i32) { ... }
fn write_i64(&mut self, num: i64) { ... }
fn write_i128(&mut self, num: i128) { ... }
fn write_f32(&mut self, num: f32) { ... }
fn write_f64(&mut self, num: f64) { ... }
}Expand description
Write bytes or numbers.
Required methods
Returns the entire slice as a bytes struct
setting the position of the new Bytes to 0.
fn remaining_mut(&mut self) -> &mut [u8][src]
fn remaining_mut(&mut self) -> &mut [u8][src]Returns the remaining bytes mutably.
Provided methods
Implementors
Returns the remaining mutable slice.
If an empty slice is returned, this does not mean you can’t write anymore.
Writes a slice. Allocates more space if the slice is
bigger than the Vec.
Returns the remaining mutable slice.
If an empty slice is returned, this does not mean you can’t write anymore.
Write a slice. Allocates more space if the slice is
bigger than the Vec.
Returns the remaining mutable slice.
If an empty slice is returned, this does not mean you can’t write anymore.
Write a slice. Allocates more space if the slice is
bigger than the Vec.