pub trait StringOrStr: Sealed {
// Required method
fn to_string(self) -> String;
}Expand description
A trait implemented by String and &str.
This is more specific than AsRef<str>, which can accidentally include
many other undesired types.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".