Skip to main content

CommandController

Trait CommandController 

Source
pub trait CommandController {
    // Provided methods
    fn command(&mut self, _ctx: &mut CommandCtx, _command: &Command<'_>) { ... }
    fn wake(&mut self, _ctx: &mut CommandCtx) { ... }
    fn debug_name(&self) -> &'static str { ... }
}
Expand description

Non-widget application service that receives commands on the UI thread. Controllers are owned by their application/window builder and are dropped automatically with that owner.

Provided Methods§

Source

fn command(&mut self, _ctx: &mut CommandCtx, _command: &Command<'_>)

Source

fn wake(&mut self, _ctx: &mut CommandCtx)

Called for an explicit scheduler-only CommandSender::wake.

Source

fn debug_name(&self) -> &'static str

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§