[][src]Struct bytestring::ByteString

pub struct ByteString(_);

A utf-8 encoded string with Bytes as a storage.

Methods

impl ByteString[src]

pub fn new() -> Self[src]

Creates a new ByteString.

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

Get a reference to the underlying bytes object.

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

Unwraps this ByteString, returning the underlying bytes object.

pub const fn from_static(src: &'static str) -> ByteString[src]

Creates a new ByteString from a static str.

pub const unsafe fn from_bytes_unchecked(src: Bytes) -> ByteString[src]

Creates a new ByteString from a Bytes.

Trait Implementations

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

impl Borrow<str> for ByteString[src]

impl Clone for ByteString[src]

impl Debug for ByteString[src]

impl Default for ByteString[src]

impl Deref for ByteString[src]

type Target = str

The resulting type after dereferencing.

impl Display for ByteString[src]

impl Eq for ByteString[src]

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

impl From<String> for ByteString[src]

impl Hash for ByteString[src]

impl Ord for ByteString[src]

impl PartialEq<ByteString> for ByteString[src]

impl<T: AsRef<str>> PartialEq<T> for ByteString[src]

impl PartialEq<str> for ByteString[src]

impl PartialOrd<ByteString> for ByteString[src]

impl StructuralEq for ByteString[src]

impl StructuralPartialEq for ByteString[src]

impl<'a> TryFrom<&'a [u8; 0]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 1]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 10]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 11]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 12]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 13]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 14]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 15]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 16]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 2]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 3]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 4]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 5]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 6]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 7]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 8]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8; 9]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8]> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl TryFrom<Bytes> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl TryFrom<BytesMut> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

impl TryFrom<Vec<u8>> for ByteString[src]

type Error = Utf8Error

The type returned in the event of a conversion error.

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<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> ToString for T where
    T: Display + ?Sized
[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.