Struct tl::Bytes[][src]

pub struct Bytes<'a>(_);

A wrapper around a DST-slice

Implementations

impl<'a> Bytes<'a>[src]

pub fn as_utf8_str(&self) -> Cow<'a, str>[src]

Convenient method for lossy-encoding the data as UTF8

pub fn raw(&self) -> &'a [u8][src]

Returns the raw data wrapped by this struct

Trait Implementations

impl<'a> AsBytes for Bytes<'a>[src]

impl<'a> Clone for Bytes<'a>[src]

impl<'a> Debug for Bytes<'a>[src]

Custom Debug trait is implemented which displays the data as a UTF8 string, to make it easier to read for humans when logging

impl<'a> Eq for Bytes<'a>[src]

impl<'a> From<&'a [u8]> for Bytes<'a>[src]

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

impl<'a> Hash for Bytes<'a>[src]

impl<'a> Ord for Bytes<'a>[src]

impl<'a> PartialEq<Bytes<'a>> for Bytes<'a>[src]

impl<'a> PartialOrd<Bytes<'a>> for Bytes<'a>[src]

impl<'a> StructuralEq for Bytes<'a>[src]

impl<'a> StructuralPartialEq for Bytes<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Bytes<'a>

impl<'a> Send for Bytes<'a>

impl<'a> Sync for Bytes<'a>

impl<'a> Unpin for Bytes<'a>

impl<'a> UnwindSafe for Bytes<'a>

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.