pub type SharedBytesRef<'s> = FlexStr<'s, [u8], Arc<[u8]>>;Available on crate feature
bytes only.Expand description
Shared [u8] type that can optionally hold borrows
Aliased Type§
pub enum SharedBytesRef<'s> {
Borrowed(&'s [u8]),
Inlined(InlineFlexStr<[u8]>),
RefCounted(Arc<[u8]>),
Boxed(Box<[u8]>),
}Variants§
Borrowed(&'s [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(Arc<[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>