[][src]Trait workerpool::Worker

pub trait Worker: Default + 'static {
    type Input: Send;
    type Output: Send;
    fn execute(&mut self, _: Self::Input) -> Self::Output;
}

Abstraction of a worker which executes tasks in its own thread.

Associated Types

type Input: Send

type Output: Send

Loading content...

Required methods

fn execute(&mut self, _: Self::Input) -> Self::Output

Loading content...

Implementors

impl<T: Send + 'static> Worker for ThunkWorker<T>[src]

type Input = Thunk<'static, T>

type Output = T

Loading content...