pub trait ToDedicatedString {
type Target;
// Required method
fn try_to_dedicated_string(&self) -> Result<Self::Target, TryReserveError>;
// Provided method
fn to_dedicated_string(&self) -> Self::Target { ... }
}
Available on crate feature
alloc
only.Expand description
A trait for types that can be converted to a dedicated allocated string types.
Required Associated Types§
Required Methods§
sourcefn try_to_dedicated_string(&self) -> Result<Self::Target, TryReserveError>
fn try_to_dedicated_string(&self) -> Result<Self::Target, TryReserveError>
Converts the value to the allocated string.