[][src]Trait async_nursery::Nurse

pub trait Nurse<Out: 'static + Send> {
    pub fn nurse_obj(
        &self,
        fut: FutureObj<'static, Out>
    ) -> Result<(), NurseErr>; }

Implementors provide the possiblity to nurse futures. Technically this means you can spawn on this object without the tasks having to return () but still you get no JoinHandle.

Semantically this means it will manage the JoinHandles for you.

There is a blanket impl extenstion trait NurseExt so you can spawn futures directly without having to create the FutureObj yourself.

Required methods

pub fn nurse_obj(&self, fut: FutureObj<'static, Out>) -> Result<(), NurseErr>[src]

Spawn a future and store it's JoinHandle.

Loading content...

Implementations on Foreign Types

impl<T: ?Sized, Out> Nurse<Out> for &T where
    T: Nurse<Out>,
    Out: 'static + Send
[src]

impl<T: ?Sized, Out> Nurse<Out> for &mut T where
    T: Nurse<Out>,
    Out: 'static + Send
[src]

impl<T: ?Sized, Out> Nurse<Out> for Box<T> where
    T: Nurse<Out>,
    Out: 'static + Send
[src]

impl<T: ?Sized, Out> Nurse<Out> for Arc<T> where
    T: Nurse<Out>,
    Out: 'static + Send
[src]

impl<T: ?Sized, Out> Nurse<Out> for Rc<T> where
    T: Nurse<Out>,
    Out: 'static + Send
[src]

impl<T, Out> Nurse<Out> for Instrumented<T> where
    T: Nurse<Out>,
    Out: 'static + Send
[src]

impl<T, Out> Nurse<Out> for WithDispatch<T> where
    T: Nurse<Out>,
    Out: 'static + Send
[src]

Loading content...

Implementors

impl<S, Out> Nurse<Out> for Nursery<S, Out> where
    S: SpawnHandle<Out>,
    Out: 'static + Send
[src]

Loading content...