[][src]Struct async_nursery::NurseryStream

pub struct NurseryStream<Out> { /* fields omitted */ }

Collection of JoinHandles of tasks spawned on the nursery. When this is dropped, all spawned tasks are canceled. You can poll the Stream implementation on this to obtain the outputs of your tasks. You can await the Future implementation if you don't care about the outputs but just want to wait until all spawned tasks are done.

Methods

impl<Out> NurseryStream<Out>[src]

pub fn close_nursery(&mut self) -> &mut Self[src]

Close this NurseryStream. Related Nursery will no longer be able to spawn. This allows the stream to end. Alternatively you can drop all related Nursery or call Nursery::close_nursery.

Trait Implementations

impl<Out: Debug> Debug for NurseryStream<Out>[src]

impl<Out> FusedFuture for NurseryStream<Out> where
    Out: 'static, 
[src]

impl<Out> FusedStream for NurseryStream<Out> where
    Out: 'static, 
[src]

impl<Out> Future for NurseryStream<Out> where
    Out: 'static, 
[src]

type Output = ()

The type of value produced on completion.

impl<Out> Stream for NurseryStream<Out> where
    Out: 'static, 
[src]

type Item = Out

Values yielded by the stream.

fn size_hint(&self) -> (usize, Option<usize>)[src]

A hint of the number of tasks currently being awaited. There is no upper bound, because we don't keep track of the tasks that are in the channel between the Nursery and the NurseryStream.

Auto Trait Implementations

impl<Out> !RefUnwindSafe for NurseryStream<Out>

impl<Out> Send for NurseryStream<Out> where
    Out: Send

impl<Out> Sync for NurseryStream<Out> where
    Out: Send

impl<Out> Unpin for NurseryStream<Out>

impl<Out> !UnwindSafe for NurseryStream<Out>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<S> TryStreamExt for S where
    S: TryStream + ?Sized
[src]