[][src]Trait scoped_spawn::ScopedSpawn

pub trait ScopedSpawn: Clone + Send + Sync {
    type CancelSender: SignalSender + Send;
    type DoneReceiver: SignalReceiver + Send;
    type FutureCancelSender: SignalSender + Send;
    type FutureDoneReceiver: SignalReceiver + Send;
    type Raw: RawScopedSpawn;
    fn spawn<Fut, Fun, Done>(
        &self,
        fun: Fun,
        done: Done
    ) -> Result<(), SpawnError>
    where
        Fut: Future<Output = ()> + Send + 'static,
        Fun: FnOnce(Self) -> Fut,
        Done: FnOnce() + Send + 'static
;
fn spawn_with_signal<Fut, Fun, Done>(
        &self,
        fun: Fun,
        done: Done
    ) -> Result<ParentSignals<Self::CancelSender, Self::DoneReceiver>, SpawnError>
    where
        Fut: Future<Output = ()> + Send + 'static,
        Fun: FnOnce(Self) -> Fut,
        Done: FnOnce() + Send + 'static
;
fn spawn_future<Fut, Done>(
        &self,
        fut: Fut,
        done: Done
    ) -> Result<(), SpawnError>
    where
        Fut: Future<Output = ()> + Send + 'static,
        Done: FnOnce() + Send + 'static
;
fn spawn_future_with_signal<Fut, Done>(
        &self,
        fut: Fut,
        done: Done
    ) -> Result<ParentSignals<Self::FutureCancelSender, Self::FutureDoneReceiver>, SpawnError>
    where
        Fut: Future<Output = ()> + Send + 'static,
        Done: FnOnce() + Send + 'static
;
fn as_raw(&self) -> &Self::Raw;
fn into_raw(self) -> Self::Raw; }

Associated Types

Loading content...

Required methods

fn spawn<Fut, Fun, Done>(&self, fun: Fun, done: Done) -> Result<(), SpawnError> where
    Fut: Future<Output = ()> + Send + 'static,
    Fun: FnOnce(Self) -> Fut,
    Done: FnOnce() + Send + 'static, 

fn spawn_with_signal<Fut, Fun, Done>(
    &self,
    fun: Fun,
    done: Done
) -> Result<ParentSignals<Self::CancelSender, Self::DoneReceiver>, SpawnError> where
    Fut: Future<Output = ()> + Send + 'static,
    Fun: FnOnce(Self) -> Fut,
    Done: FnOnce() + Send + 'static, 

fn spawn_future<Fut, Done>(
    &self,
    fut: Fut,
    done: Done
) -> Result<(), SpawnError> where
    Fut: Future<Output = ()> + Send + 'static,
    Done: FnOnce() + Send + 'static, 

fn spawn_future_with_signal<Fut, Done>(
    &self,
    fut: Fut,
    done: Done
) -> Result<ParentSignals<Self::FutureCancelSender, Self::FutureDoneReceiver>, SpawnError> where
    Fut: Future<Output = ()> + Send + 'static,
    Done: FnOnce() + Send + 'static, 

fn as_raw(&self) -> &Self::Raw

fn into_raw(self) -> Self::Raw

Loading content...

Implementors

impl<Spawn: Spawn + Clone + Send + Sync> ScopedSpawn for ScopedSpawner<Spawn>[src]

type CancelSender = RemoteCancelSenderWithSignal

type DoneReceiver = RemoteDoneReceiverWithSignal

type FutureCancelSender = RemoteCancelSenderWithSignal

type FutureDoneReceiver = RemoteDoneReceiverWithSignal

type Raw = RemoteSpawner

Loading content...