Skip to main content

Ready

Struct Ready 

Source
pub struct Ready<K, P, S> { /* private fields */ }
Expand description

A selected, admitted request coupled to its completed body.

Implementations§

Source§

impl<K, P, S> Ready<K, P, S>

Source

pub const fn body(&self) -> &Body<S>

Source

pub const fn prepared(&self) -> &P

Source

pub fn into_body(self) -> Body<S>

Source§

impl<P, S> Ready<Task, P, S>

Source

pub fn into_parts(self) -> (P, Body<S>)

Source§

impl<P, S> Ready<Sync, P, S>

Source

pub fn try_project<'d, D, T, F>( self, decoder: &D, f: F, ) -> Result<(T, Body<S>), Project<Sync, P, S>>
where S: Source<'d>, D: Decode<Prepared = P>, F: for<'a> FnOnce(&D, Scoped<'a, 'd, D>) -> T,

Borrows this completed body only for its matching selected request.

Source§

impl<'d, P> Ready<Sync, P, Segments<'d>>

Source

pub fn with_input<T>( self, run: impl for<'owner> FnOnce(P, Input<Input<'owner, 'd>>) -> T, ) -> T

Keeps response selection and the matching final owner in one generative scope.

Trait Implementations§

Source§

impl<K: Debug, P: Debug, S: Debug> Debug for Ready<K, P, S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<K, P, S> Forget for Ready<K, P, S>

§

impl<K, P, S> Freeze for Ready<K, P, S>
where P: Freeze, Body<S>: Freeze, PhantomData<fn() -> K>: Freeze,

§

impl<K, P, S> RefUnwindSafe for Ready<K, P, S>

§

impl<K, P, S> Send for Ready<K, P, S>
where P: Send, Body<S>: Send, PhantomData<fn() -> K>: Send,

§

impl<K, P, S> Sync for Ready<K, P, S>
where P: Sync, Body<S>: Sync, PhantomData<fn() -> K>: Sync,

§

impl<K, P, S> Unpin for Ready<K, P, S>
where P: Unpin, Body<S>: Unpin, PhantomData<fn() -> K>: Unpin,

§

impl<K, P, S> UnsafeUnpin for Ready<K, P, S>

§

impl<K, P, S> UnwindSafe for Ready<K, P, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Convert<T> for T

Source§

fn into(self) -> T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.