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§
Required Methods§
sourcefn try_poll(
self: Pin<&mut Self>,
srv: &mut A,
ctx: &mut A::Context,
task: &mut Context<'_>,
) -> Poll<Result<Self::Ok, Self::Error>>
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.