pub struct AsyncGen<Fut, Y> { /* private fields */ }
Expand description
Represent an asyncronus generator. It implementations AsyncGenerator
trait.
This struct
is created by gen()
. See its documentation for more details.
Implementations§
Source§impl<Fut, Y, R> AsyncGen<Fut, Y>where
Fut: Future<Output = Return<R>>,
impl<Fut, Y, R> AsyncGen<Fut, Y>where
Fut: Future<Output = Return<R>>,
Sourcepub async fn resume(self: &mut Pin<&mut Self>) -> GeneratorState<Y, R>
pub async fn resume(self: &mut Pin<&mut Self>) -> GeneratorState<Y, R>
See AsyncGenerator::poll_resume
for more details.
Trait Implementations§
Source§impl<Fut, Y, R> AsyncGenerator for AsyncGen<Fut, Y>where
Fut: Future<Output = Return<R>>,
impl<Fut, Y, R> AsyncGenerator for AsyncGen<Fut, Y>where
Fut: Future<Output = Return<R>>,
Source§fn poll_resume(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<GeneratorState<Self::Yield, Self::Return>>
fn poll_resume( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<GeneratorState<Self::Yield, Self::Return>>
Resumes the execution of this generator. Read more
Source§impl<Fut, Y> Stream for AsyncGen<Fut, Y>
impl<Fut, Y> Stream for AsyncGen<Fut, Y>
impl<'__pin, Fut, Y> Unpin for AsyncGen<Fut, Y>where
PinnedFieldsOf<__Origin<'__pin, Fut, Y>>: Unpin,
Auto Trait Implementations§
impl<Fut, Y> Freeze for AsyncGen<Fut, Y>where
Fut: Freeze,
impl<Fut, Y> !RefUnwindSafe for AsyncGen<Fut, Y>
impl<Fut, Y> Send for AsyncGen<Fut, Y>
impl<Fut, Y> Sync for AsyncGen<Fut, Y>
impl<Fut, Y> !UnwindSafe for AsyncGen<Fut, Y>
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