[−]Function actix_web::actix::fut::err
pub fn err<T, E, A>(e: E) -> FutureResult<T, E, A>
Creates a "leaf future" from an immediate value of a failed computation.
The returned future is similar to result
where it will immediately run a
scheduled callback with the provided value.
Examples
use actix::{fut, Actor, Context}; struct MyActor; impl Actor for MyActor { type Context = Context<Self>; } let future_of_err_1 = fut::err::<u32, u32, MyActor>(1);