[−][src]Struct httpbis::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]
fn remaining(&self) -> usize
[src]
fn bytes(&self) -> &[u8]
[src]
fn bytes_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize
[src]
fn advance(&mut self, cnt: usize)
[src]
fn has_remaining(&self) -> bool
[src]
fn copy_to_slice(&mut self, dst: &mut [u8])
[src]
fn get_u8(&mut self) -> u8
[src]
fn get_i8(&mut self) -> i8
[src]
fn get_u16(&mut self) -> u16
[src]
fn get_u16_le(&mut self) -> u16
[src]
fn get_i16(&mut self) -> i16
[src]
fn get_i16_le(&mut self) -> i16
[src]
fn get_u32(&mut self) -> u32
[src]
fn get_u32_le(&mut self) -> u32
[src]
fn get_i32(&mut self) -> i32
[src]
fn get_i32_le(&mut self) -> i32
[src]
fn get_u64(&mut self) -> u64
[src]
fn get_u64_le(&mut self) -> u64
[src]
fn get_i64(&mut self) -> i64
[src]
fn get_i64_le(&mut self) -> i64
[src]
fn get_u128(&mut self) -> u128
[src]
fn get_u128_le(&mut self) -> u128
[src]
fn get_i128(&mut self) -> i128
[src]
fn get_i128_le(&mut self) -> i128
[src]
fn get_uint(&mut self, nbytes: usize) -> u64
[src]
fn get_uint_le(&mut self, nbytes: usize) -> u64
[src]
fn get_int(&mut self, nbytes: usize) -> i64
[src]
fn get_int_le(&mut self, nbytes: usize) -> i64
[src]
fn get_f32(&mut self) -> f32
[src]
fn get_f32_le(&mut self) -> f32
[src]
fn get_f64(&mut self) -> f64
[src]
fn get_f64_le(&mut self) -> f64
[src]
fn to_bytes(&mut self) -> Bytes
[src]
impl BufGetBytes for BytesDeque
[src]
impl Debug for BytesDeque
[src]
impl Default for BytesDeque
[src]
fn default() -> 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?
fn into_iter(self) -> Self::IntoIter
[src]
impl PartialEq<[u8]> for BytesDeque
[src]
impl PartialEq<BytesDeque> for BytesDeque
[src]
Auto Trait Implementations
impl RefUnwindSafe for BytesDeque
impl Send for BytesDeque
impl Sync for BytesDeque
impl Unpin for BytesDeque
impl UnwindSafe for BytesDeque
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<B> BufExt for B where
B: Buf + ?Sized,
[src]
B: Buf + ?Sized,
fn take(self, limit: usize) -> Take<Self>
[src]
fn chain<U>(self, next: U) -> Chain<Self, U> where
U: Buf,
[src]
U: Buf,
fn reader(self) -> Reader<Self>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,