[][src]Struct httpbis::BytesDeque

pub struct BytesDeque(_);

VecDeque<Bytes> but slightly more efficient.

Implementations

impl BytesDeque[src]

pub fn new() -> BytesDeque[src]

Empty deque.

pub fn copy_from_slice(bytes: &[u8]) -> BytesDeque[src]

Create a deque by copying from bytes slice.

pub fn len(&self) -> usize[src]

Length in bytes.

pub fn extend(&mut self, bytes: Bytes)[src]

Append Bytes to this deque.

pub fn get_bytes(&self) -> Bytes[src]

Get deque contents as Bytes object.

This operation is cheap if this deque contains only single Bytes object, otherwise it allocates memory and copies data.

pub fn into_bytes(self) -> Bytes[src]

Convert contents into Bytes object.

This function tries to avoid memory allocation when possible.

Trait Implementations

impl Buf for BytesDeque[src]

impl BufGetBytes for BytesDeque[src]

impl Debug for BytesDeque[src]

impl Default for BytesDeque[src]

impl<'a> From<&'a str> for BytesDeque[src]

impl From<Bytes> for BytesDeque[src]

impl From<Vec<u8>> for BytesDeque[src]

impl Into<Bytes> for BytesDeque[src]

impl Into<Vec<u8>> for BytesDeque[src]

impl<'a> IntoIterator for &'a BytesDeque[src]

type Item = &'a Bytes

The type of the elements being iterated over.

type IntoIter = Iter<'a>

Which kind of iterator are we turning this into?

impl PartialEq<[u8]> for BytesDeque[src]

impl PartialEq<BytesDeque> for BytesDeque[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<B> BufExt for B where
    B: Buf + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.