Skip to main content

Output

Struct Output 

Source
pub struct Output<'d, R: Task<'d, A>, A> { /* private fields */ }
Expand description

Route-specific result retained by one generated task.

Implementations§

Source§

impl<'d, R: Task<'d, A>, A> Output<'d, R, A>

Source

pub const fn response(id: Id<'d>, response: R::Output) -> Self

Source

pub const fn rejected(id: Id<'d>, reject: Reject) -> Self

Source

pub fn into_parts(self) -> (Id<'d>, Outcome<R::Output>)

Source

pub fn emit<S>( self, make: impl FnOnce(Id<'d>) -> S, ) -> Emitted<'d, S, Stream<'d, R, A>>
where S: Streaming<'d, 'd>,

Trait Implementations§

Source§

impl<'d, R, A> Completion<'d> for Output<'d, R, A>
where R: Task<'d, A>, <R::Output as IntoOutput<'d, 'd>>::Output: Complete<'d, 'd>,

Source§

fn emit<E: Encode<'d, 'd>>( self, make: impl FnOnce(Id<'d>) -> E, ) -> Complete<'d, E>

Auto Trait Implementations§

§

impl<'d, R, A> !Send for Output<'d, R, A>

§

impl<'d, R, A> !Sync for Output<'d, R, A>

§

impl<'d, R, A> Forget for Output<'d, R, A>

§

impl<'d, R, A> Freeze for Output<'d, R, A>
where Outcome<<R as Task<'d, A>>::Output>: Freeze,

§

impl<'d, R, A> RefUnwindSafe for Output<'d, R, A>
where Outcome<<R as Task<'d, A>>::Output>: RefUnwindSafe,

§

impl<'d, R, A> Unpin for Output<'d, R, A>
where Outcome<<R as Task<'d, A>>::Output>: Unpin,

§

impl<'d, R, A> UnsafeUnpin for Output<'d, R, A>
where Outcome<<R as Task<'d, A>>::Output>: UnsafeUnpin,

§

impl<'d, R, A> UnwindSafe for Output<'d, R, A>
where Outcome<<R as Task<'d, A>>::Output>: UnwindSafe,

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.