Struct azalea::SwarmPlugins
source · pub struct SwarmPlugins<S> { /* private fields */ }
Expand description
A map of plugin ids to SwarmPlugin
trait objects. The client stores
this so we can keep the state for our Swarm
plugins.
If you’re using azalea, you should generate this from the swarm_plugins!
macro.
Implementations§
source§impl<S> SwarmPlugins<S>where
S: 'static,
impl<S> SwarmPlugins<S>where
S: 'static,
sourcepub fn add<T: SwarmPlugin<S>>(&mut self, plugin: T)
pub fn add<T: SwarmPlugin<S>>(&mut self, plugin: T)
Add a new plugin to this set.
sourcepub fn build(self) -> SwarmPluginStates<S>
pub fn build(self) -> SwarmPluginStates<S>
Build our plugin states from this set of plugins. Note that if you’re
using azalea
you’ll probably never need to use this as it’s called
for you.
Trait Implementations§
source§impl<S: Clone> Clone for SwarmPlugins<S>
impl<S: Clone> Clone for SwarmPlugins<S>
source§fn clone(&self) -> SwarmPlugins<S>
fn clone(&self) -> SwarmPlugins<S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<S: Default> Default for SwarmPlugins<S>
impl<S: Default> Default for SwarmPlugins<S>
source§fn default() -> SwarmPlugins<S>
fn default() -> SwarmPlugins<S>
Returns the “default value” for a type. Read more