pub struct IterContext<T>(/* private fields */);
Expand description
Send
iterator context.
This type implements Send
.
Implementations§
Source§impl<T> IterContext<T>where
T: Send,
impl<T> IterContext<T>where
T: Send,
Sourcepub fn ret(&mut self, value: T) -> impl Future<Output = ()> + Send + Sync + '_
pub fn ret(&mut self, value: T) -> impl Future<Output = ()> + Send + Sync + '_
Yields a single value. Similar to C#’s yield return
or Python’s yield
.
Sourcepub async fn ret_iter(
&mut self,
iter: impl IntoIterator<Item = T> + Send + Sync,
)
pub async fn ret_iter( &mut self, iter: impl IntoIterator<Item = T> + Send + Sync, )
Yields all values from an iterator. Similar to Python’s yield from
or JavaScript’s yield*
.
Auto Trait Implementations§
impl<T> Freeze for IterContext<T>
impl<T> RefUnwindSafe for IterContext<T>
impl<T> Send for IterContext<T>where
T: Send,
impl<T> Sync for IterContext<T>where
T: Send,
impl<T> Unpin for IterContext<T>
impl<T> UnwindSafe for IterContext<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