LocalBytes

Type Alias LocalBytes 

Source
pub type LocalBytes = FlexStr<'static, [u8], Rc<[u8]>>;
Available on crate feature bytes only.
Expand description

Local [u8] type (NOTE: This can’t be shared between threads)

Aliased Type§

pub enum LocalBytes {
    Borrowed(&'static [u8]),
    Inlined(InlineFlexStr<[u8]>),
    RefCounted(Rc<[u8]>),
    Boxed(Box<[u8]>),
}

Variants§

§

Borrowed(&'static [u8])

Borrowed string - borrowed strings are imported as &S

§

Inlined(InlineFlexStr<[u8]>)

Inline string - owned strings that are small enough to be stored inline

§

RefCounted(Rc<[u8]>)

Reference counted string - owned strings that are too large for inline storage

§

Boxed(Box<[u8]>)

Boxed string - heap allocated strings are imported as Box<S>