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 T: Clone + Send
Type for transported packages.
type C: Clone + Send + Sync
Type for context that will be passed to Module
at initialization.