pub trait StrLikeExtension: ToOwned {
// Required methods
fn to_ascii_lowercase_cow(&self) -> Cow<'_, Self>;
fn ascii_nat_cmp(&self, other: &Self) -> Ordering;
}Required Methods§
Sourcefn to_ascii_lowercase_cow(&self) -> Cow<'_, Self>
fn to_ascii_lowercase_cow(&self) -> Cow<'_, Self>
Returns the same value as String::to_lowercase. The only difference
is that this functions returns Cow and does not allocate
if the string is already in lowercase.
Sourcefn ascii_nat_cmp(&self, other: &Self) -> Ordering
fn ascii_nat_cmp(&self, other: &Self) -> Ordering
Compare two strings using a natural ASCII order.
Uppercase letters come first (e.g. A < a < B < b)
and number are compared in a human way (e.g. 9 < 10).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.