[−][src]Struct bytestring::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 AsRef<str> for ByteString[src]
impl Borrow<str> for ByteString[src]
impl Clone for ByteString[src]
fn clone(&self) -> ByteString[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for ByteString[src]
impl Default for ByteString[src]
fn default() -> ByteString[src]
impl Deref for ByteString[src]
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]
fn hash<H: Hasher>(&self, state: &mut H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Ord for ByteString[src]
fn cmp(&self, other: &ByteString) -> Ordering[src]
fn max(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> Self1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self[src]
impl<T: AsRef<str>> PartialEq<T> for ByteString[src]
impl PartialEq<str> for ByteString[src]
impl PartialOrd<ByteString> for ByteString[src]
fn partial_cmp(&self, other: &ByteString) -> Option<Ordering>[src]
fn lt(&self, other: &ByteString) -> bool[src]
fn le(&self, other: &ByteString) -> bool[src]
fn gt(&self, other: &ByteString) -> bool[src]
fn ge(&self, other: &ByteString) -> bool[src]
impl StructuralEq 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.
fn try_from(value: &'a [u8; 0]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 1]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 1]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 10]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 10]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 11]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 11]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 12]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 12]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 13]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 13]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 14]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 14]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 15]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 15]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 16]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 16]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 2]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 2]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 3]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 3]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 4]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 4]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 5]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 5]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 6]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 6]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 7]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 7]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 8]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 8]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8; 9]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8; 9]) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a [u8]> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8]) -> Result<Self, Self::Error>[src]
impl TryFrom<Bytes> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: Bytes) -> Result<Self, Self::Error>[src]
impl TryFrom<BytesMut> for ByteString[src]
type Error = Utf8Error
The type returned in the event of a conversion error.
fn try_from(value: BytesMut) -> Result<Self, Self::Error>[src]
impl TryFrom<Vec<u8>> for ByteString[src]
Auto Trait Implementations
impl RefUnwindSafe for ByteString
impl Send for ByteString
impl Sync for ByteString
impl Unpin for ByteString
impl UnwindSafe for ByteString
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<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
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>,