Function ocl::async::err [] [src]

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

Creates a "leaf future" from an immediate value of a failed computation.

The returned future is similar to done where it will immediately run a scheduled callback with the provided value.

Examples

use ocl::async::err;

let future_of_err_1 = err::<u32>("1".into());