Struct bytes::str::SmallByteStr [] [src]

pub struct SmallByteStr {
    // some fields omitted
}

Methods

impl SmallByteStr

fn zero() -> SmallByteStr

fn from_slice(bytes: &[u8]) -> Option<SmallByteStr>

fn as_slice(&self) -> &[u8]

Trait Implementations

impl ByteStr for SmallByteStr

type Buf = SmallByteStrBuf

fn buf(&self) -> SmallByteStrBuf

fn concat<B: ByteStr + 'static>(&self, other: &B) -> Bytes

fn len(&self) -> usize

fn slice(&self, begin: usize, end: usize) -> Bytes

fn is_empty(&self) -> bool

fn slice_from(&self, begin: usize) -> Bytes

fn slice_to(&self, end: usize) -> Bytes

fn split_at(&self, mid: usize) -> (Bytes, Bytes)

impl ToBytes for SmallByteStr

fn to_bytes(self) -> Bytes

impl Index<usize> for SmallByteStr

type Output = u8

fn index(&self, index: usize) -> &u8

impl<B: ByteStr> PartialEq<B> for SmallByteStr

fn eq(&self, other: &B) -> bool

fn ne(&self, other: &B) -> bool

Derived Implementations

impl Copy for SmallByteStr

impl Clone for SmallByteStr

fn clone(&self) -> SmallByteStr

1.0.0fn clone_from(&mut self, source: &Self)