Struct wasm_rgame::DelegateSpawner
[−]
[src]
pub struct DelegateSpawner { /* fields omitted */ }
Type used to spawn / spawn_root new delegates onto the Application
Methods
impl DelegateSpawner
[src]
pub fn new() -> DelegateSpawner
[src]
pub fn spawn<D>(&mut self, spawnable_delegate: D) -> SpawnHandle<D::Handle> where
D: 'static + SpawnableDelegate,
[src]
D: 'static + SpawnableDelegate,
Takes ownership of a Delegate, returns a SpawnHandle containing the Handle type of the SpawnableDelegate
The spawned object cannot be found by the object spawning it, therefore it should use the Handle returned to get information
Dropping all instances of the SpawnHandle will cause the delegate to be dropped.
pub fn spawn_root<D: 'static + Delegate>(&mut self, delegate: D)
[src]
Takes ownership of a Delegate, it is held for the lifetime of the entire Application