pub fn once<'a, L: ?Sized + CovariantLending>(value: Lend<'a, L>) -> Once<'a, L>Expand description
Creates a lender that yields an element exactly once.
The Lender version of core::iter::once().
ยงExamples
let mut o = lender::once::<lend!(&'lend mut i32)>(&mut value);
assert_eq!(o.next(), Some(&mut 42));
assert_eq!(o.next(), None);