Skip to main content

AddSpawnable

Trait AddSpawnable 

Source
pub trait AddSpawnable {
    // Required method
    fn add_spawnable(self, key: impl Into<SpawnKey>, _: impl Spawn) -> SpawnKey;
}
👎Deprecated since 0.2.4:

see documentation at https://github.com/Zeenobit/moonshine_spawn for details

Expand description

Trait used to register a spawnable with an App.

§Usage

A spawnable is any thing which implements Spawn. A spawnable is registered by a unique SpawnKey. This spawn key may then be used to spawn a new instance of the spawnable.

Required Methods§

Source

fn add_spawnable(self, key: impl Into<SpawnKey>, _: impl Spawn) -> SpawnKey

👎Deprecated since 0.2.4:

see documentation at https://github.com/Zeenobit/moonshine_spawn for details

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AddSpawnable for &mut App

Source§

fn add_spawnable( self, key: impl Into<SpawnKey>, spawnable: impl Spawn, ) -> SpawnKey

👎Deprecated since 0.2.4:

see documentation at https://github.com/Zeenobit/moonshine_spawn for details

Implementors§