WorkFactory

Trait WorkFactory 

Source
pub trait WorkFactory:
    Sync
    + Send
    + Sized
    + 'static {
    type Work: Work + 'static;

    // Required method
    fn build(&self) -> Self::Work;
}

Required Associated Types§

Source

type Work: Work + 'static

Required Methods§

Source

fn build(&self) -> Self::Work

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<W, F> WorkFactory for F
where W: Work, F: Fn() -> W + Sync + Send + 'static,

Source§

type Work = W