CommandStateExt

Trait CommandStateExt 

Source
pub trait CommandStateExt<S> {
    // Required methods
    fn commands(&mut self) -> &mut Commands<S>;
    fn register_command<H: CommandHandler + FromState<S> + 'static>(&mut self);
}
Expand description

Gives direct access to Commands functions from the state

Required Methods§

Source

fn commands(&mut self) -> &mut Commands<S>

Source

fn register_command<H: CommandHandler + FromState<S> + 'static>(&mut self)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<S: Send + Sync + Clone + ProvideStateRef<Commands<S>> + 'static> CommandStateExt<S> for S