1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// A Worker that can be spawned by a spawner.
pub trait Spawnable {
    /// Spawner Type.
    type Spawner;

    /// Creates a spawner.
    fn spawner() -> Self::Spawner;
}

/// A trait to enable public workers being registered in a web worker.
pub trait Registrable {
    /// Registrar Type.
    type Registrar;

    /// Creates a registrar for the current worker.
    fn registrar() -> Self::Registrar;
}