pub struct Remit<'a, T>(_);Expand description
Allows a generator to provide values to an iterator.
A generator that only accepts the 'static lifetime can only be used when boxed.
Implementations§
source§impl<T> Remit<'_, T>
impl<T> Remit<'_, T>
sourcepub fn value(&self, value: T) -> impl Future<Output = ()> + '_
pub fn value(&self, value: T) -> impl Future<Output = ()> + '_
Remits the value to the iterator.
If multiple calls are performed without awaiting for the iterator to consume them, an unbounded buffer will be allocated to store the extra values.
A caller should await the future, but does not need to. The provided future will only finish when all values have been accepted by the iterator.
The provided future does not awake on the iterator consuming values; the iterator will poll the originally created future unilaterally.
If the iterator has been dropped, values will be discarded and the future(s) will always poll as pending.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for Remit<'a, T>
impl<'a, T> !Send for Remit<'a, T>
impl<'a, T> !Sync for Remit<'a, T>
impl<'a, T> Unpin for Remit<'a, T>
impl<'a, T> !UnwindSafe for Remit<'a, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more