pub enum FlexStr<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> {
Borrowed(&'s S),
Inlined(InlineFlexStr<S>),
RefCounted(R),
Boxed(Box<S>),
}Expand description
Flexible string type that can store a borrowed string, an inline string, a reference counted string, or a boxed string
Variants§
Borrowed(&'s S)
Borrowed string - borrowed strings are imported as &S
Inlined(InlineFlexStr<S>)
Inline string - owned strings that are small enough to be stored inline
RefCounted(R)
Reference counted string - owned strings that are too large for inline storage
Boxed(Box<S>)
Boxed string - heap allocated strings are imported as Box<S>
Implementations§
Source§impl<'s, R: RefCounted<CStr>> FlexStr<'s, CStr, R>
impl<'s, R: RefCounted<CStr>> FlexStr<'s, CStr, R>
Sourcepub fn try_from_bytes_with_or_without_nul(
bytes: &'s [u8],
) -> Result<Self, InteriorNulError>
Available on crate feature cstr only.
pub fn try_from_bytes_with_or_without_nul( bytes: &'s [u8], ) -> Result<Self, InteriorNulError>
cstr only.Attempt to create a CStr from borrowed bytes with or without a trailing NUL byte.
Sourcepub fn as_bytes_with_nul(&self) -> &[u8] ⓘ
Available on crate feature cstr only.
pub fn as_bytes_with_nul(&self) -> &[u8] ⓘ
cstr only.Borrow the CStr as bytes with a trailing NUL byte
Source§impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> FlexStr<'s, S, R>
impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> FlexStr<'s, S, R>
Source§impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> FlexStr<'s, S, R>
impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> FlexStr<'s, S, R>
Sourcepub fn from_owned(s: S::Owned) -> FlexStr<'static, S, R>
pub fn from_owned(s: S::Owned) -> FlexStr<'static, S, R>
Create a new string from an owned string (most likely without copy or allocation). The result is a Boxed variant.
Source§impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> FlexStr<'s, S, R>
impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> FlexStr<'s, S, R>
Sourcepub const fn from_borrowed(s: &'s S) -> FlexStr<'s, S, R>
pub const fn from_borrowed(s: &'s S) -> FlexStr<'s, S, R>
Create a new string from a borrowed string. This is a const fn because it does not allocate and results in a Borrowed variant.
Sourcepub fn from_inline(s: InlineFlexStr<S>) -> FlexStr<'s, S, R>
pub fn from_inline(s: InlineFlexStr<S>) -> FlexStr<'s, S, R>
Create a new string from an inline string. This results in an Inlined variant.
Sourcepub fn from_ref_counted(s: R) -> FlexStr<'s, S, R>
pub fn from_ref_counted(s: R) -> FlexStr<'s, S, R>
Create a new string from a reference counted string. This results in a RefCounted variant.
Sourcepub fn from_boxed(s: Box<S>) -> FlexStr<'s, S, R>
pub fn from_boxed(s: Box<S>) -> FlexStr<'s, S, R>
Create a new string from a boxed string. This results in a Boxed variant.
Sourcepub fn is_borrowed(&self) -> bool
pub fn is_borrowed(&self) -> bool
Returns true if this is a borrowed string
Sourcepub fn is_inlined(&self) -> bool
pub fn is_inlined(&self) -> bool
Returns true if this is an inlined string
Sourcepub fn is_ref_counted(&self) -> bool
pub fn is_ref_counted(&self) -> bool
Returns true if this is a reference counted string
Sourcepub fn is_on_heap(&self) -> bool
pub fn is_on_heap(&self) -> bool
Returns true if this is a string that is on the heap
Sourcepub fn is_off_heap(&self) -> bool
pub fn is_off_heap(&self) -> bool
Returns true if this is a string that is off the heap
Sourcepub fn optimize(self) -> FlexStr<'s, S, R>
pub fn optimize(self) -> FlexStr<'s, S, R>
Optimize the string variant. This is a no-op for Inlined/Borrowed variants. RefCounted strings will attempt to inline, but otherwise be left as ref counted. Boxed strings will attempt to inline, but otherwise be converted to a ref counted string.
Sourcepub fn to_owned(&self) -> FlexStr<'static, S, R>
pub fn to_owned(&self) -> FlexStr<'static, S, R>
Convert a string reference to an owned string. Inlined/RefCounted variants are cloned, Borrowed/Boxed variants are copied into a new Inlined or RefCounted owned string.
Sourcepub fn into_owned(self) -> FlexStr<'static, S, R>
pub fn into_owned(self) -> FlexStr<'static, S, R>
Consume a string and convert it to an owned string. Inlined/RefCounted/Boxed variants are moved, Borrowed variants are copied into a new Inlined or RefCounted owned string.
Sourcepub fn as_ref_type(&self) -> &S
pub fn as_ref_type(&self) -> &S
Borrow a string reference as &S
Sourcepub fn to_owned_type(&self) -> S::Owned
pub fn to_owned_type(&self) -> S::Owned
Convert a string reference to an owned string. S::to_owned is called on all variants.
Sourcepub fn as_raw_bytes(&self) -> &[u8] ⓘ
pub fn as_raw_bytes(&self) -> &[u8] ⓘ
Borrow the string as a raw byte slice (NOTE: includes trailing NUL for CStr)
Source§impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> FlexStr<'s, S, R>
impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> FlexStr<'s, S, R>
Sourcepub fn into_owned_type(self) -> S::Owned
pub fn into_owned_type(self) -> S::Owned
Consume a string and convert it to an owned string. S::to_owned is called on Borrowed/Inlined/RefCounted variants.
Boxed variants are converted directly into S::Owned (most likely without copy or allocation).
Source§impl<'s, S: ?Sized + ImmutableBytes, R: RefCountedMut<S>> FlexStr<'s, S, R>
impl<'s, S: ?Sized + ImmutableBytes, R: RefCountedMut<S>> FlexStr<'s, S, R>
Sourcepub fn to_mut_type_fallback(&mut self) -> &mut S
pub fn to_mut_type_fallback(&mut self) -> &mut S
Borrow the string as a mutable string reference, converting if needed. If the string is Borrowed, it is made into a reference counted string first. RefCounted variants will allocate + copy if they are shared. In all other cases, the string is borrowed as a mutable reference directly.
Source§impl<'s, S: ?Sized + StringFromBytesMut, R: RefCountedMut<S>> FlexStr<'s, S, R>
impl<'s, S: ?Sized + StringFromBytesMut, R: RefCountedMut<S>> FlexStr<'s, S, R>
Sourcepub fn to_mut_type(&mut self) -> &mut S
pub fn to_mut_type(&mut self) -> &mut S
Borrow the string as a mutable string reference, converting if needed. If the string is borrowed, it is made into an owned string first. RefCounted variants will allocate + copy if they are shared. In all other cases, the string is borrowed as a mutable reference directly.
Source§impl<'s, S: ?Sized + StringToFromBytes> FlexStr<'s, S, Arc<S>>
impl<'s, S: ?Sized + StringToFromBytes> FlexStr<'s, S, Arc<S>>
Sourcepub fn to_local(&self) -> FlexStr<'s, S, Rc<S>>
pub fn to_local(&self) -> FlexStr<'s, S, Rc<S>>
Convert a shared string reference to a local string. The Borrowed/Inlined variants are copied, RefCounted is copied into a new allocation, and Boxed is copied into an Inlined or RefCounted variant.
Sourcepub fn into_local(self) -> FlexStr<'s, S, Rc<S>>
pub fn into_local(self) -> FlexStr<'s, S, Rc<S>>
Consume a shared string and convert it to a local string. The Borrowed/Inlined/Boxed variants are moved, and RefCounted is copied into a new allocation.
Source§impl<'s, S: ?Sized + StringToFromBytes> FlexStr<'s, S, Rc<S>>
impl<'s, S: ?Sized + StringToFromBytes> FlexStr<'s, S, Rc<S>>
Convert a local string reference to a shared string. The Borrowed/Inlined variants are copied, RefCounted is copied into a new allocation, and Boxed is copied into an Inlined or RefCounted variant.
Consume a local string and convert it to a shared string. The Borrowed/Inlined/Boxed variants are moved, and RefCounted is copied into a new allocation.
Trait Implementations§
Source§impl<'s, S, R: RefCounted<S>> AsRef<[u8]> for FlexStr<'s, S, R>
Available on crate feature bytes only.
impl<'s, S, R: RefCounted<S>> AsRef<[u8]> for FlexStr<'s, S, R>
bytes only.Source§impl<'s, S, R: RefCounted<S>> AsRef<CStr> for FlexStr<'s, S, R>
Available on crate feature cstr only.
impl<'s, S, R: RefCounted<S>> AsRef<CStr> for FlexStr<'s, S, R>
cstr only.Source§impl<'s, S, R: RefCounted<S>> AsRef<OsStr> for FlexStr<'s, S, R>
Available on crate features std and osstr only.
impl<'s, S, R: RefCounted<S>> AsRef<OsStr> for FlexStr<'s, S, R>
std and osstr only.Source§impl<'s, S, R: RefCounted<S>> AsRef<Path> for FlexStr<'s, S, R>
Available on crate features std and path only.
impl<'s, S, R: RefCounted<S>> AsRef<Path> for FlexStr<'s, S, R>
std and path only.Source§impl<'s, S, R: RefCounted<S>> AsRef<str> for FlexStr<'s, S, R>
Available on crate feature str only.
impl<'s, S, R: RefCounted<S>> AsRef<str> for FlexStr<'s, S, R>
str only.Source§impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> Borrow<S> for FlexStr<'s, S, R>
impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> Borrow<S> for FlexStr<'s, S, R>
Source§impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> Clone for FlexStr<'s, S, R>
impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> Clone for FlexStr<'s, S, R>
Source§impl<'s, S: Debug + ?Sized + StringToFromBytes, R: Debug + RefCounted<S>> Debug for FlexStr<'s, S, R>
impl<'s, S: Debug + ?Sized + StringToFromBytes, R: Debug + RefCounted<S>> Debug for FlexStr<'s, S, R>
Source§impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> Default for FlexStr<'s, S, R>
impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> Default for FlexStr<'s, S, R>
Source§impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> Deref for FlexStr<'s, S, R>
impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> Deref for FlexStr<'s, S, R>
Source§impl<'de, S: ?Sized + StringToFromBytes, R: RefCounted<S>> Deserialize<'de> for FlexStr<'static, S, R>where
Box<S>: Deserialize<'de>,
Available on crate feature serde only.
impl<'de, S: ?Sized + StringToFromBytes, R: RefCounted<S>> Deserialize<'de> for FlexStr<'static, S, R>where
Box<S>: Deserialize<'de>,
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl<'s, S, R: RefCounted<S>> Display for FlexStr<'s, S, R>
impl<'s, S, R: RefCounted<S>> Display for FlexStr<'s, S, R>
Source§impl<'s, R: RefCounted<Path>> From<&'s OsStr> for FlexStr<'s, Path, R>
Available on crate features std and path only.
impl<'s, R: RefCounted<Path>> From<&'s OsStr> for FlexStr<'s, Path, R>
std and path only.Source§impl<'s, R: RefCounted<OsStr>> From<&'s Path> for FlexStr<'s, OsStr, R>
Available on crate features std and osstr only.
impl<'s, R: RefCounted<OsStr>> From<&'s Path> for FlexStr<'s, OsStr, R>
std and osstr only.Source§impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> From<&'s S> for FlexStr<'s, S, R>
impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> From<&'s S> for FlexStr<'s, S, R>
Source§impl<'s, R: RefCounted<[u8]>> From<&'s str> for FlexStr<'s, [u8], R>
Available on crate feature bytes only.
impl<'s, R: RefCounted<[u8]>> From<&'s str> for FlexStr<'s, [u8], R>
bytes only.Source§impl<'s, R: RefCounted<OsStr>> From<&'s str> for FlexStr<'s, OsStr, R>
Available on crate features std and osstr only.
impl<'s, R: RefCounted<OsStr>> From<&'s str> for FlexStr<'s, OsStr, R>
std and osstr only.Source§impl<'s, R: RefCounted<Path>> From<&'s str> for FlexStr<'s, Path, R>
Available on crate features std and path only.
impl<'s, R: RefCounted<Path>> From<&'s str> for FlexStr<'s, Path, R>
std and path only.Source§impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> From<Box<S>> for FlexStr<'s, S, R>
impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> From<Box<S>> for FlexStr<'s, S, R>
Source§impl<'s, R: RefCounted<CStr>> From<CString> for FlexStr<'s, CStr, R>
Available on crate feature cstr only.
impl<'s, R: RefCounted<CStr>> From<CString> for FlexStr<'s, CStr, R>
cstr only.Source§impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> From<Cow<'s, S>> for FlexStr<'s, S, R>
impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> From<Cow<'s, S>> for FlexStr<'s, S, R>
Source§impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> From<InlineFlexStr<S>> for FlexStr<'s, S, R>
impl<'s, S: ?Sized + StringToFromBytes, R: RefCounted<S>> From<InlineFlexStr<S>> for FlexStr<'s, S, R>
Source§fn from(s: InlineFlexStr<S>) -> Self
fn from(s: InlineFlexStr<S>) -> Self
Source§impl<'s, R: RefCounted<OsStr>> From<OsString> for FlexStr<'s, OsStr, R>
Available on crate features std and osstr only.
impl<'s, R: RefCounted<OsStr>> From<OsString> for FlexStr<'s, OsStr, R>
std and osstr only.Source§impl<'s, R: RefCounted<Path>> From<OsString> for FlexStr<'s, Path, R>
Available on crate features std and path only.
impl<'s, R: RefCounted<Path>> From<OsString> for FlexStr<'s, Path, R>
std and path only.Source§impl<'s, R: RefCounted<OsStr>> From<PathBuf> for FlexStr<'s, OsStr, R>
Available on crate features std and osstr and path only.
impl<'s, R: RefCounted<OsStr>> From<PathBuf> for FlexStr<'s, OsStr, R>
std and osstr and path only.Source§impl<'s, R: RefCounted<Path>> From<PathBuf> for FlexStr<'s, Path, R>
Available on crate features std and path only.
impl<'s, R: RefCounted<Path>> From<PathBuf> for FlexStr<'s, Path, R>
std and path only.Source§impl<'s, R: RefCounted<OsStr>> From<String> for FlexStr<'s, OsStr, R>
Available on crate features std and osstr only.
impl<'s, R: RefCounted<OsStr>> From<String> for FlexStr<'s, OsStr, R>
std and osstr only.Source§impl<'s, R: RefCounted<Path>> From<String> for FlexStr<'s, Path, R>
Available on crate features std and path only.
impl<'s, R: RefCounted<Path>> From<String> for FlexStr<'s, Path, R>
std and path only.Source§impl<'s, R: RefCounted<str>> From<String> for FlexStr<'s, str, R>
Available on crate feature str only.
impl<'s, R: RefCounted<str>> From<String> for FlexStr<'s, str, R>
str only.Source§impl<'s, R: RefCounted<[u8]>> From<Vec<u8>> for FlexStr<'s, [u8], R>
Available on crate feature bytes only.
impl<'s, R: RefCounted<[u8]>> From<Vec<u8>> for FlexStr<'s, [u8], R>
bytes only.Source§impl<R: RefCounted<[u8]>> FromStr for FlexStr<'static, [u8], R>
Available on crate feature bytes only.
impl<R: RefCounted<[u8]>> FromStr for FlexStr<'static, [u8], R>
bytes only.Source§impl<R: RefCounted<CStr>> FromStr for FlexStr<'static, CStr, R>
Available on crate feature cstr only.
impl<R: RefCounted<CStr>> FromStr for FlexStr<'static, CStr, R>
cstr only.Source§impl<R: RefCounted<OsStr>> FromStr for FlexStr<'static, OsStr, R>
Available on crate features std and osstr only.
impl<R: RefCounted<OsStr>> FromStr for FlexStr<'static, OsStr, R>
std and osstr only.Source§impl<R: RefCounted<Path>> FromStr for FlexStr<'static, Path, R>
Available on crate features std and path only.
impl<R: RefCounted<Path>> FromStr for FlexStr<'static, Path, R>
std and path only.Source§impl<R: RefCounted<str>> FromStr for FlexStr<'static, str, R>
Available on crate feature str only.
impl<R: RefCounted<str>> FromStr for FlexStr<'static, str, R>
str only.Source§impl<'s, S, R: RefCounted<S>> Hash for FlexStr<'s, S, R>
impl<'s, S, R: RefCounted<S>> Hash for FlexStr<'s, S, R>
Source§impl<'s, S, R: RefCounted<S>, I: SliceIndex<S>> Index<I> for FlexStr<'s, S, R>
impl<'s, S, R: RefCounted<S>, I: SliceIndex<S>> Index<I> for FlexStr<'s, S, R>
Source§impl<'s, S, R: RefCounted<S>> Ord for FlexStr<'s, S, R>
impl<'s, S, R: RefCounted<S>> Ord for FlexStr<'s, S, R>
Source§impl<'s, S, R: RefCounted<S>> PartialEq<&[u8]> for FlexStr<'s, S, R>
Available on crate feature bytes only.
impl<'s, S, R: RefCounted<S>> PartialEq<&[u8]> for FlexStr<'s, S, R>
bytes only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<&CStr> for FlexStr<'s, S, R>
Available on crate feature cstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<&CStr> for FlexStr<'s, S, R>
cstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<&OsStr> for FlexStr<'s, S, R>
Available on crate features std and osstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<&OsStr> for FlexStr<'s, S, R>
std and osstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<&Path> for FlexStr<'s, S, R>
Available on crate features std and path only.
impl<'s, S, R: RefCounted<S>> PartialEq<&Path> for FlexStr<'s, S, R>
std and path only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<&str> for FlexStr<'s, S, R>
Available on crate feature str only.
impl<'s, S, R: RefCounted<S>> PartialEq<&str> for FlexStr<'s, S, R>
str only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<[u8]> for FlexStr<'s, S, R>
Available on crate feature bytes only.
impl<'s, S, R: RefCounted<S>> PartialEq<[u8]> for FlexStr<'s, S, R>
bytes only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<CStr> for FlexStr<'s, S, R>
Available on crate feature cstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<CStr> for FlexStr<'s, S, R>
cstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<CString> for FlexStr<'s, S, R>
Available on crate feature cstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<CString> for FlexStr<'s, S, R>
cstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<Cow<'s, [u8]>> for FlexStr<'s, S, R>
Available on crate feature bytes only.
impl<'s, S, R: RefCounted<S>> PartialEq<Cow<'s, [u8]>> for FlexStr<'s, S, R>
bytes only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<Cow<'s, CStr>> for FlexStr<'s, S, R>
Available on crate feature cstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<Cow<'s, CStr>> for FlexStr<'s, S, R>
cstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<Cow<'s, OsStr>> for FlexStr<'s, S, R>
Available on crate features std and osstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<Cow<'s, OsStr>> for FlexStr<'s, S, R>
std and osstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<Cow<'s, Path>> for FlexStr<'s, S, R>
Available on crate features std and path only.
impl<'s, S, R: RefCounted<S>> PartialEq<Cow<'s, Path>> for FlexStr<'s, S, R>
std and path only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<Cow<'s, str>> for FlexStr<'s, S, R>
Available on crate feature str only.
impl<'s, S, R: RefCounted<S>> PartialEq<Cow<'s, str>> for FlexStr<'s, S, R>
str only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for &[u8]
Available on crate feature bytes only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for &[u8]
bytes only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for &CStr
Available on crate feature cstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for &CStr
cstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for &OsStr
Available on crate features std and osstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for &OsStr
std and osstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for &Path
Available on crate features std and path only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for &Path
std and path only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for &str
Available on crate feature str only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for &str
str only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for [u8]
Available on crate feature bytes only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for [u8]
bytes only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for CStr
Available on crate feature cstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for CStr
cstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for CString
Available on crate feature cstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for CString
cstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Cow<'s, [u8]>
Available on crate feature bytes only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Cow<'s, [u8]>
bytes only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Cow<'s, CStr>
Available on crate feature cstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Cow<'s, CStr>
cstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Cow<'s, OsStr>
Available on crate features std and osstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Cow<'s, OsStr>
std and osstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Cow<'s, Path>
Available on crate features std and path only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Cow<'s, Path>
std and path only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Cow<'s, str>
Available on crate feature str only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Cow<'s, str>
str only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for OsStr
Available on crate features std and osstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for OsStr
std and osstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for OsString
Available on crate features std and osstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for OsString
std and osstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Path
Available on crate features std and path only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Path
std and path only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for PathBuf
Available on crate features std and path only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for PathBuf
std and path only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for String
Available on crate feature str only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for String
str only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Vec<u8>
Available on crate feature bytes only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for Vec<u8>
bytes only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for str
Available on crate feature str only.
impl<'s, S, R: RefCounted<S>> PartialEq<FlexStr<'s, S, R>> for str
str only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<OsStr> for FlexStr<'s, S, R>
Available on crate features std and osstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<OsStr> for FlexStr<'s, S, R>
std and osstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<OsString> for FlexStr<'s, S, R>
Available on crate features std and osstr only.
impl<'s, S, R: RefCounted<S>> PartialEq<OsString> for FlexStr<'s, S, R>
std and osstr only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<Path> for FlexStr<'s, S, R>
Available on crate features std and path only.
impl<'s, S, R: RefCounted<S>> PartialEq<Path> for FlexStr<'s, S, R>
std and path only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<PathBuf> for FlexStr<'s, S, R>
Available on crate features std and path only.
impl<'s, S, R: RefCounted<S>> PartialEq<PathBuf> for FlexStr<'s, S, R>
std and path only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<String> for FlexStr<'s, S, R>
Available on crate feature str only.
impl<'s, S, R: RefCounted<S>> PartialEq<String> for FlexStr<'s, S, R>
str only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<Vec<u8>> for FlexStr<'s, S, R>
Available on crate feature bytes only.
impl<'s, S, R: RefCounted<S>> PartialEq<Vec<u8>> for FlexStr<'s, S, R>
bytes only.Source§impl<'s, S, R: RefCounted<S>> PartialEq<str> for FlexStr<'s, S, R>
Available on crate feature str only.
impl<'s, S, R: RefCounted<S>> PartialEq<str> for FlexStr<'s, S, R>
str only.Source§impl<'s, S, R: RefCounted<S>> PartialEq for FlexStr<'s, S, R>
impl<'s, S, R: RefCounted<S>> PartialEq for FlexStr<'s, S, R>
Source§impl<'s, S, R: RefCounted<S>> PartialOrd for FlexStr<'s, S, R>
impl<'s, S, R: RefCounted<S>> PartialOrd for FlexStr<'s, S, R>
Source§impl<'s, S, R: RefCounted<S>> Serialize for FlexStr<'s, S, R>
Available on crate feature serde only.
impl<'s, S, R: RefCounted<S>> Serialize for FlexStr<'s, S, R>
serde only.Source§impl<S: ?Sized + StringToFromBytes, R: RefCounted<S>> StringLike<S> for FlexStr<'_, S, R>
impl<S: ?Sized + StringToFromBytes, R: RefCounted<S>> StringLike<S> for FlexStr<'_, S, R>
Source§fn as_ref_type(&self) -> &S
fn as_ref_type(&self) -> &S
&SSource§fn into_owned_type(self) -> S::Owned
fn into_owned_type(self) -> S::Owned
S::to_owned is called on Borrowed/Inlined/RefCounted variants.
Boxed variants are converted directly into S::Owned (most likely without copy or allocation).Source§fn to_owned_type(&self) -> S::Owned
fn to_owned_type(&self) -> S::Owned
S::to_owned is called on all variants.Source§fn as_os_str(&self) -> &OsStr
fn as_os_str(&self) -> &OsStr
std and osstr only.&OsStrSource§fn as_path(&self) -> &Path
fn as_path(&self) -> &Path
std and path only.&PathSource§fn into_string(self) -> String
fn into_string(self) -> String
Source§fn into_os_string(self) -> OsString
fn into_os_string(self) -> OsString
std and osstr only.Source§fn into_path_buf(self) -> PathBuf
fn into_path_buf(self) -> PathBuf
std and path only.Source§fn into_c_string(self) -> CString
fn into_c_string(self) -> CString
cstr only.Source§fn into_vec_bytes(self) -> Vec<u8> ⓘ
fn into_vec_bytes(self) -> Vec<u8> ⓘ
bytes only.Vec<u8>Source§fn to_os_string(&self) -> OsString
fn to_os_string(&self) -> OsString
std and osstr only.Source§fn to_path_buf(&self) -> PathBuf
fn to_path_buf(&self) -> PathBuf
std and path only.Source§fn to_c_string(&self) -> CString
fn to_c_string(&self) -> CString
cstr only.Source§impl<'s, S, R: RefCounted<S>> ToSocketAddrs for FlexStr<'s, S, R>
Available on crate feature std only.
impl<'s, S, R: RefCounted<S>> ToSocketAddrs for FlexStr<'s, S, R>
std only.Source§type Iter = <S as ToSocketAddrs>::Iter
type Iter = <S as ToSocketAddrs>::Iter
Source§fn to_socket_addrs(&self) -> Result<<S as ToSocketAddrs>::Iter>
fn to_socket_addrs(&self) -> Result<<S as ToSocketAddrs>::Iter>
SocketAddrs. Read moreSource§impl<'s, R: RefCounted<CStr>> TryFrom<&'s [u8]> for FlexStr<'s, CStr, R>
Available on crate feature cstr only.
impl<'s, R: RefCounted<CStr>> TryFrom<&'s [u8]> for FlexStr<'s, CStr, R>
cstr only.Source§impl<'s, R: RefCounted<str>> TryFrom<&'s [u8]> for FlexStr<'s, str, R>
Available on crate feature str only.
impl<'s, R: RefCounted<str>> TryFrom<&'s [u8]> for FlexStr<'s, str, R>
str only.Source§impl<'s, R: RefCounted<str>> TryFrom<&'s OsStr> for FlexStr<'s, str, R>
Available on crate features str and std only.
impl<'s, R: RefCounted<str>> TryFrom<&'s OsStr> for FlexStr<'s, str, R>
str and std only.Source§impl<'s, R: RefCounted<str>> TryFrom<&'s Path> for FlexStr<'s, str, R>
Available on crate features str and std only.
impl<'s, R: RefCounted<str>> TryFrom<&'s Path> for FlexStr<'s, str, R>
str and std only.Source§impl<'s, R: RefCounted<CStr>> TryFrom<&'s str> for FlexStr<'s, CStr, R>
Available on crate feature cstr only.
impl<'s, R: RefCounted<CStr>> TryFrom<&'s str> for FlexStr<'s, CStr, R>
cstr only.Source§impl<R: RefCounted<str>> TryFrom<CString> for FlexStr<'static, str, R>
Available on crate feature str only.
impl<R: RefCounted<str>> TryFrom<CString> for FlexStr<'static, str, R>
str only.Source§impl<R: RefCounted<str>> TryFrom<Vec<u8>> for FlexStr<'static, str, R>
Available on crate feature str only.
impl<R: RefCounted<str>> TryFrom<Vec<u8>> for FlexStr<'static, str, R>
str only.