Trait FromEncodedStr
pub trait FromEncodedStr {
type DecodedType<'a>: Borrow<Self>;
type DecodingError;
// Required method
fn from_encoded_str(
data: &str,
) -> Result<Self::DecodedType<'_>, Self::DecodingError>;
}
Expand description
Decodes data from a string.
Required Associated Typesยง
type DecodedType<'a>: Borrow<Self>
type DecodedType<'a>: Borrow<Self>
The decoded data.
type DecodingError
type DecodingError
The type of an error encountered during decoding.
Required Methodsยง
fn from_encoded_str(
data: &str,
) -> Result<Self::DecodedType<'_>, Self::DecodingError>
fn from_encoded_str( data: &str, ) -> Result<Self::DecodedType<'_>, Self::DecodingError>
Decodes the string.
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.