pub trait Decode {
type Prepared: Prepared;
type Routes: Family<Self::Prepared>;
type Head: Head<Prepared = Self::Prepared, Start: Selection<Self::Prepared, Guard = Self::Routes, Routed = <Self::Routes as Family<Self::Prepared>>::State<Routed>>>;
type Plan: Policy;
type Cause;
type Error<'req>;
type Projected<'req, 'd>
where 'd: 'req;
type Egress<'d>: Bound;
// Required methods
fn reject<'req>(error: Self::Error<'req>) -> Reject;
fn try_full(
&self,
head: RetainedHead<Decoded, Selected<RetainRaw>>,
) -> Result<Self::Head, HeadError<Self::Cause>>;
fn try_head(
&self,
head: RetainedHead<<Self::Plan as Policy>::Block, Selected<Self::Plan>>,
) -> Result<Self::Head, HeadError<Self::Cause>>;
fn try_project<'d, I, T, F>(
&self,
prepared: Self::Prepared,
body: Input<I>,
project: F,
) -> Projection<T, I::Owner, (Self::Prepared, Input<I>)>
where I: Project<'d>,
F: for<'req> FnOnce(Scoped<'req, 'd, Self, I::Proof>) -> T;
fn try_dispatch<'req, 'd, E: Encode<'req, 'd>>(
&self,
request: Self::Projected<'req, 'd>,
encoder: E,
) -> Result<<E as Encode<'req, 'd>>::Prepared, (Error<<E as Encode<'req, 'd>>::Error, Infallible, Self::Error<'req>>, <E as Cancel>::Target)>
where 'd: 'req;
}Required Associated Types§
type Prepared: Prepared
type Routes: Family<Self::Prepared>
type Head: Head<Prepared = Self::Prepared, Start: Selection<Self::Prepared, Guard = Self::Routes, Routed = <Self::Routes as Family<Self::Prepared>>::State<Routed>>>
type Plan: Policy
type Cause
type Error<'req>
type Projected<'req, 'd>where
'd: 'req,
Required Methods§
fn reject<'req>(error: Self::Error<'req>) -> Reject
Sourcefn try_full(
&self,
head: RetainedHead<Decoded, Selected<RetainRaw>>,
) -> Result<Self::Head, HeadError<Self::Cause>>
fn try_full( &self, head: RetainedHead<Decoded, Selected<RetainRaw>>, ) -> Result<Self::Head, HeadError<Self::Cause>>
Routes an admitted request while retaining every decoded field.
fn try_head( &self, head: RetainedHead<<Self::Plan as Policy>::Block, Selected<Self::Plan>>, ) -> Result<Self::Head, HeadError<Self::Cause>>
fn try_project<'d, I, T, F>( &self, prepared: Self::Prepared, body: Input<I>, project: F, ) -> Projection<T, I::Owner, (Self::Prepared, Input<I>)>
fn try_dispatch<'req, 'd, E: Encode<'req, 'd>>(
&self,
request: Self::Projected<'req, 'd>,
encoder: E,
) -> Result<<E as Encode<'req, 'd>>::Prepared, (Error<<E as Encode<'req, 'd>>::Error, Infallible, Self::Error<'req>>, <E as Cancel>::Target)>where
'd: 'req,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".