ActorFactory

Trait ActorFactory 

Source
pub trait ActorFactory:
    Send
    + Sync
    + 'static {
    type Args: Send + 'static;
    type Runnable;

    // Required method
    fn produce(&self, args: Self::Args) -> Self::Runnable;
}

Required Associated Types§

Source

type Args: Send + 'static

Source

type Runnable

Required Methods§

Source

fn produce(&self, args: Self::Args) -> Self::Runnable

Implementors§

Source§

impl<F, A, R> ActorFactory for ActorFactoryMut<F, A, R>
where Self: Sync + Send + 'static, F: FnMut(A) -> R + Send + 'static, A: Send + 'static, R: Send + 'static,

Source§

impl<F, A, R> ActorFactory for ActorFactoryOnce<F, A, R>
where Self: Sync + Send + 'static, F: FnOnce(A) -> R + Send + 'static, A: Send + 'static, R: Send + 'static,