Function futures::future::err [] [src]

pub fn err<T, E>(e: E) -> FutureResult<T, E>

Creates a new future that will immediately fail with the given error.

Examples

use futures_core::future::*;

let future_of_err_1 = err::<u32, u32>(1);