Trait dharma::event_loop::ModuleConstructor [] [src]

pub trait ModuleConstructor: Send + Sync {
    type T: Clone + Send;
    type C: Clone + Send + Sync;
    fn construct(
        &self,
        _: &mut Self::C
    ) -> Box<Module<T = Self::T, C = Self::C>>; }

To avoid requirement for Module to be Send and Sync it is constructed by special trait object.

NOTE: ModuleConstructor could be replaced by FnBox if it was stable.

Associated Types

Type for transported packages.

Type for context that will be passed to Module at initialization.

Required Methods

Constructs new Module.

Implementors