pub enum Buffer<'a> {
    Vector(&'a mut Vec<u8>),
    Slice(&'a mut [u8]),
    Bytes(&'a mut BytesMut),
}
Expand description

Buffer that can be used to write data into.

Variants

Vector(&'a mut Vec<u8>)

A Vec<u8> acts as a buffer.

Slice(&'a mut [u8])

A byte slice acts as a buffer.

Bytes(&'a mut BytesMut)

A BytesMut acts as a buffer.

Trait Implementations

Formats the value using the given formatter. Read more

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

Returns the argument unchanged.

Calls U::from(self).

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

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.