ResponseFuture

Enum ResponseFuture 

Source
pub enum ResponseFuture<Req, Resp, Exec> {
    Init(Exec, Req, *const ()),
    Executed(SlotReader<Resp, (Req, Vec<u8>)>),
    Fused,
}

Variants§

§

Init(Exec, Req, *const ())

§

Executed(SlotReader<Resp, (Req, Vec<u8>)>)

§

Fused

Implementations§

Source§

impl<Req, Resp, Exec> ResponseFuture<Req, Resp, Exec>

Source

pub fn new(exec: Exec, req: Req, callback: *const ()) -> Self

Source

pub fn new_without_req( exec: Exec, req: Req, callback: *const (), ) -> ResponseFutureWithoutReq<Req, Resp, Exec>

Trait Implementations§

Source§

impl<Req, Resp, Exec> Future for ResponseFuture<Req, Resp, Exec>
where Exec: FnOnce(Req::Ref, *const (), *const ()) + Unpin, Req: Unpin + ToRef,

Source§

type Output = (Resp, Req)

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempts to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
Source§

impl<Req: Send, Resp: Send, Exec> Send for ResponseFuture<Req, Resp, Exec>

Source§

impl<Req: Sync, Resp: Sync, Exec> Sync for ResponseFuture<Req, Resp, Exec>

Auto Trait Implementations§

§

impl<Req, Resp, Exec> Freeze for ResponseFuture<Req, Resp, Exec>
where Exec: Freeze, Req: Freeze,

§

impl<Req, Resp, Exec> RefUnwindSafe for ResponseFuture<Req, Resp, Exec>
where Exec: RefUnwindSafe, Req: RefUnwindSafe, Resp: RefUnwindSafe,

§

impl<Req, Resp, Exec> Unpin for ResponseFuture<Req, Resp, Exec>
where Exec: Unpin, Req: Unpin,

§

impl<Req, Resp, Exec> UnwindSafe for ResponseFuture<Req, Resp, Exec>
where Exec: UnwindSafe, Req: UnwindSafe + RefUnwindSafe, Resp: RefUnwindSafe,

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> 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<F> IntoFuture for F
where F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.