pub fn err<T, E>(e: E) -> FutureResult<T, E>
Expand description
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);
pub fn err<T, E>(e: E) -> FutureResult<T, E>
Creates a new future that will immediately fail with the given error.
use futures_core::future::*;
let future_of_err_1 = err::<u32, u32>(1);