Skip to main content

FromEncodedStr

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>

The decoded data.

type DecodingError

The type of an error encountered during decoding.

Required Methodsยง

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ยง

ยง

impl FromEncodedStr for [u8]

ยง

impl FromEncodedStr for str

Implementorsยง