Trait crossbus::actor::Future

source ·
pub trait Future<A>where
    A: Actor,{
    type Output;

    // Required methods
    fn poll(
        self: Pin<&mut Self>,
        act: &mut A,
        ctx: &mut Context<A>,
        cx: &mut CoreContext<'_>
    ) -> Poll<Self::Output>;
    fn downcast_ref(&self) -> Option<&dyn Any>;
    fn downcast_mut(self: Pin<&mut Self>) -> Option<Pin<&mut dyn Any>>;
}
Expand description

An abstraction for Actor’s Future routine

Required Associated Types§

source

type Output

the returned type of value when the future polled successfully

Required Methods§

source

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

source

fn downcast_ref(&self) -> Option<&dyn Any>

source

fn downcast_mut(self: Pin<&mut Self>) -> Option<Pin<&mut dyn Any>>

Implementors§

source§

impl<A> Future<A> for Blocker<A>where A: Actor + Blocking<A>,

§

type Output = ()

source§

impl<A> Future<A> for Delayer<A>where A: Actor + Delaying<A>, A::Message: Message, Self: Unpin,

§

type Output = ()

source§

impl<A, F> Future<A> for Localizer<A, F>where F: CoreFuture, A: Actor,

§

type Output = <F as Future>::Output

source§

impl<A, S> Future<A> for MStreaming<S>where A: Actor<Message = S::Item> + MStream<S::Item>, S: CoreStream + 'static, S::Item: Message,

§

type Output = ()

source§

impl<A, S> Future<A> for Streaming<A, S>where S: Stream + 'static, A: Actor + Stream<S::Item>,

§

type Output = ()

source§

impl<A: Actor, F, Output> Future<A> for Fwhere F: Unpin + FnMut(&mut A, &mut Context<A>, &mut CoreContext<'_>) -> Poll<Output>,

§

type Output = Output