Trait actix::fut::try_future::ActorTryFuture

source ·
pub trait ActorTryFuture<A: Actor>: ActorFuture<A> + Sealed<A> {
    type Ok;
    type Error;

    // Required method
    fn try_poll(
        self: Pin<&mut Self>,
        srv: &mut A,
        ctx: &mut A::Context,
        task: &mut Context<'_>,
    ) -> Poll<Result<Self::Ok, Self::Error>>;
}
Expand description

A convenience for actor futures that return Result values that includes a variety of adapters tailored to such actor futures.

Required Associated Types§

source

type Ok

The type of successful values yielded by this actor future

source

type Error

The type of failures yielded by this actor future

Required Methods§

source

fn try_poll( self: Pin<&mut Self>, srv: &mut A, ctx: &mut A::Context, task: &mut Context<'_>, ) -> Poll<Result<Self::Ok, Self::Error>>

Poll this ActorTryFuture as if it were a ActorFuture.

This method is a stopgap for a compiler limitation that prevents us from directly inheriting from the ActorFuture trait; in the actor future it won’t be needed.

Implementors§

source§

impl<A, F, T, E> ActorTryFuture<A> for F
where A: Actor, F: ActorFuture<A, Output = Result<T, E>> + ?Sized,

§

type Ok = T

§

type Error = E