pub trait TryFromRequest {
    type Error;

    // Required method
    fn try_from_request(req: Request) -> Result<Self, Self::Error>
       where Self: Sized;
}
Expand description

A trait for any type that can be constructor from a Request

Required Associated Types§

source

type Error

The error if the conversion fails

Required Methods§

source

fn try_from_request(req: Request) -> Result<Self, Self::Error>
where Self: Sized,

Try to turn the request into the type

Implementors§