Extract

Trait Extract 

Source
pub trait Extract: Sized {
    type Error: ExtractError;

    // Required method
    fn extract(payload: Vec<u8>) -> Result<Self, Self::Error>;
}
Expand description

Payload extractor for encodings

Required Associated Types§

Source

type Error: ExtractError

The error type returned when extraction fails.

Required Methods§

Source

fn extract(payload: Vec<u8>) -> Result<Self, Self::Error>

Convert from a payload to a value

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.

Implementations on Foreign Types§

Source§

impl Extract for Vec<u8>

Source§

type Error = Infallible

Source§

fn extract(payload: Vec<u8>) -> Result<Self, Self::Error>

Implementors§