pub type FosterByteString = Foster<Box<ByteString>, &'static str>;
Available on crate feature
byte_string
only.Expand description
Foster for ByteString.
Supports IntoOwned, HasLength, AsRef<str>, Eq/PartialEq, Ord/PartialOrd, Hash, and Display.
Note that we need to wrap ByteString in a Box because ByteString has interior mutability and thus cannot be part of a constant value’s type.
Aliased Type§
pub enum FosterByteString {
Owned(Box<ByteString>),
Fostered(&'static str),
}
Variants§
Trait Implementations§
Source§impl AsRef<str> for FosterByteString
impl AsRef<str> for FosterByteString
Source§impl Display for FosterByteString
impl Display for FosterByteString
Source§impl From<&str> for FosterByteString
impl From<&str> for FosterByteString
Source§impl Hash for FosterByteString
impl Hash for FosterByteString
Source§impl IntoOwned for FosterByteString
impl IntoOwned for FosterByteString
Source§fn into_owned(self) -> Self
fn into_owned(self) -> Self
Into owned.