pub trait Extractor<'a, R> {
type Error: ExtractorError;
type Prepared;
// Required methods
fn validate(validate: Validate<'_>);
fn prepare(
prepare: Prepare<'_>,
) -> Pin<Box<dyn Future<Output = Result<Self::Prepared, Self::Error>> + Send + '_>>;
fn extract(
extract: Extract<'a, '_, Self::Prepared, R>,
) -> Result<Self, Self::Error>
where Self: Sized;
}
Required Associated Types§
type Error: ExtractorError
type Prepared
Required Methods§
fn validate(validate: Validate<'_>)
fn prepare( prepare: Prepare<'_>, ) -> Pin<Box<dyn Future<Output = Result<Self::Prepared, Self::Error>> + Send + '_>>
fn extract(
extract: Extract<'a, '_, Self::Prepared, R>,
) -> Result<Self, Self::Error>where
Self: Sized,
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.