[][src]Struct serde::bytes::ByteBuf

pub struct ByteBuf { /* fields omitted */ }

ByteBuf wraps a Vec<u8> and serializes as a byte array.

Implementations

impl ByteBuf[src]

pub fn new() -> Self[src]

Construct a new, empty ByteBuf.

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

Construct a new, empty ByteBuf with the specified capacity.

pub fn from<T: Into<Vec<u8>>>(bytes: T) -> Self[src]

Wrap existing bytes in a ByteBuf.

Trait Implementations

impl AsMut<[u8]> for ByteBuf[src]

impl AsMut<Vec<u8>> for ByteBuf[src]

impl AsRef<[u8]> for ByteBuf[src]

impl AsRef<Vec<u8>> for ByteBuf[src]

impl Clone for ByteBuf[src]

impl Debug for ByteBuf[src]

impl Default for ByteBuf[src]

impl Deref for ByteBuf[src]

type Target = [u8]

The resulting type after dereferencing.

impl DerefMut for ByteBuf[src]

impl Deserialize for ByteBuf[src]

impl Eq for ByteBuf[src]

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

impl Hash for ByteBuf[src]

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

impl Ord for ByteBuf[src]

impl PartialEq<ByteBuf> for ByteBuf[src]

impl PartialOrd<ByteBuf> for ByteBuf[src]

impl Serialize for ByteBuf[src]

impl StructuralEq for ByteBuf[src]

impl StructuralPartialEq for ByteBuf[src]

impl<E> ValueDeserializer<E> for ByteBuf where
    E: Error
[src]

type Deserializer = ByteBufDeserializer<E>

The actual deserializer type.

Auto Trait Implementations

impl RefUnwindSafe for ByteBuf

impl Send for ByteBuf

impl Sync for ByteBuf

impl Unpin for ByteBuf

impl UnwindSafe for ByteBuf

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.