Skip to main content

FromEncodedStr

Trait FromEncodedStr 

Source
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§

Source

type DecodedType<'a>: Borrow<Self>

The decoded data.

Source

type DecodingError

The type of an error encountered during decoding.

Required Methods§

Source

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".

Implementations on Foreign Types§

Source§

impl FromEncodedStr for [u8]

Source§

impl FromEncodedStr for str

Implementors§