Skip to main content

fallible_empty

Function fallible_empty 

Source
pub const fn fallible_empty<L: ?Sized + for<'all> FallibleLending<'all>, E>() -> Empty<L, E>
Expand description

Creates a fallible lender that yields nothing.

The FallibleLender version of core::iter::empty().

ยงExamples

let mut e = lender::fallible_empty::<
    fallible_lend!(&'lend i32), String,
>();
let x: Result<Option<&i32>, String> = e.next();
assert_eq!(x, Ok(None));