Struct simple_bytes::BytesMut[][src]

pub struct BytesMut<'a> { /* fields omitted */ }
Expand description

A mutable slice wrapper that implements BytesWrite

Implementations

You should probably use:

let bytes: BytesMut = slice.into();
// or
let bytes = BytesMut::from(slice);

Trait Implementations

Returns the entire slice.

Returns all remaining bytes.

Reads a given length of bytes. Read more

Tries to read a given length without updating the internal position. Returns None if there are not enought bytes remaining. Read more

Returns the length of the entire slice.

Reads 1 bytes converting them into an u8. Read more

Reads 2 bytes converting them into an u16. Read more

Reads 4 bytes converting them into an u32. Read more

Reads 8 bytes converting them into an u64. Read more

Reads 16 bytes converting them into an u128. Read more

Reads 1 bytes converting them into an i8. Read more

Reads 2 bytes converting them into an i16. Read more

Reads 4 bytes converting them into an i32. Read more

Reads 8 bytes converting them into an i64. Read more

Reads 16 bytes converting them into an i128. Read more

Reads 4 bytes converting them into an f32. Read more

Reads 8 bytes converting them into an f64. Read more

Returns the internal position.

Sets the internal position.

Panics

If the position exceeds the slice.

Returns the entire slice mutably.

Returns the entire slice as a bytes struct setting the position of the new Bytes to 0. Read more

Returns the remaining bytes mutably.

Writes a slice. Read more

Writes an u8. Read more

Writes an u16. Read more

Writes an u32. Read more

Writes an u64. Read more

Writes an u128. Read more

Writes an i8. Read more

Writes an i16. Read more

Writes an i32. Read more

Writes an i64. Read more

Writes an i128. Read more

Writes an f32. Read more

Writes an f64. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.