[][src]Struct runestick::Bytes

pub struct Bytes { /* fields omitted */ }

A vector of bytes.

Implementations

impl Bytes[src]

pub const fn new() -> Self[src]

Construct a new bytes container.

pub fn with_capacity(cap: usize) -> Self[src]

Construct a new bytes container with the specified capacity.

pub fn into_vec(self) -> Vec<u8>[src]

Convert into vector.

pub fn from_vec(bytes: Vec<u8>) -> Self[src]

Construct from a byte vector.

pub fn extend(&mut self, other: &Self)[src]

Do something with the bytes.

pub fn extend_str(&mut self, s: &str)[src]

Do something with the bytes.

pub fn is_empty(&self) -> bool[src]

Test if the collection is empty.

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

Get the length of the bytes collection.

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

Get the capacity of the bytes collection.

pub fn clear(&mut self)[src]

Get the bytes collection.

pub fn reserve(&mut self, additional: usize)[src]

Reserve additional space.

The exact amount is unspecified.

pub fn reserve_exact(&mut self, additional: usize)[src]

Resever additional space to the exact amount specified.

pub fn shrink_to_fit(&mut self)[src]

Shrink to fit the amount of bytes in the container.

pub fn pop(&mut self) -> Option<u8>[src]

Pop the last byte.

pub fn last(&mut self) -> Option<u8>[src]

Access the last byte.

Trait Implementations

impl Clone for Bytes[src]

impl Debug for Bytes[src]

impl Deref for Bytes[src]

type Target = [u8]

The resulting type after dereferencing.

impl DerefMut for Bytes[src]

impl Eq for Bytes[src]

impl From<Bytes> for Value[src]

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

impl FromValue for Bytes[src]

impl Hash for Bytes[src]

impl Named for Bytes[src]

impl Ord for Bytes[src]

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

impl PartialEq<Bytes> for Bytes[src]

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

impl PartialOrd<Bytes> for Bytes[src]

impl StructuralEq for Bytes[src]

impl StructuralPartialEq for Bytes[src]

impl ToValue for Bytes[src]

impl TypeOf for Bytes[src]

impl<'a> UnsafeFromValue for &'a Bytes[src]

type Output = *const Bytes

The output type from the unsafe coercion.

type Guard = RawRef

The raw guard returned. Read more

impl<'a> UnsafeFromValue for &'a mut Bytes[src]

type Output = *mut Bytes

The output type from the unsafe coercion.

type Guard = RawMut

The raw guard returned. Read more

Auto Trait Implementations

impl RefUnwindSafe for Bytes

impl Send for Bytes

impl Sync for Bytes

impl Unpin for Bytes

impl UnwindSafe for Bytes

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<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.