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§
Sourcetype DecodedType<'a>: Borrow<Self>
type DecodedType<'a>: Borrow<Self>
The decoded data.
Sourcetype DecodingError
type DecodingError
The type of an error encountered during decoding.
Required Methods§
Sourcefn 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.