pub struct Generation { /* private fields */ }Expand description
A running generation.
Implementations§
Source§impl Generation
impl Generation
pub fn cancel(&self)
pub fn canceller(&self) -> Canceller
Sourcepub async fn recv(&mut self) -> Option<Chunk>
pub async fn recv(&mut self) -> Option<Chunk>
The next chunk; None once the generation has ended.
Sourcepub fn blocking_recv(&mut self) -> Option<Chunk>
pub fn blocking_recv(&mut self) -> Option<Chunk>
Like recv, blocking the thread (not for async code).
Sourcepub fn collect_blocking(self) -> Result<(String, Stats)>
pub fn collect_blocking(self) -> Result<(String, Stats)>
Waits for the whole reply: its text and how it ended.
Trait Implementations§
Source§impl Drop for Generation
impl Drop for Generation
Auto Trait Implementations§
impl Forget for Generation
impl Freeze for Generation
impl Move for Generation
impl RefUnwindSafe for Generation
impl Send for Generation
impl Sync for Generation
impl Unpin for Generation
impl UnsafeUnpin for Generation
impl UnwindSafe for Generation
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