Skip to main content

Command

Trait Command 

Source
pub trait Command {
    // Required method
    fn execute(&self);
}
Expand description

Encapsulates a repeatedly callable block of code.

Required Methods§

Source

fn execute(&self)

Calls the encapsulated block of code.

Trait Implementations§

Source§

impl From<Heap> for Box<dyn Command>

Source§

fn from(value: Heap) -> Self

Converts to this type from the input type.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl Command for Heap

Source§

impl<C> Command for ExecutableCommand<C>
where C: Command,

Source§

impl<C> Command for ObservingCommand<C>
where C: Command,

Source§

impl<D, H> Command for Hashable<D, H>
where D: Command, H: Hash + Eq,

Source§

impl<E> Command for CommandExecutable<E>
where E: Executable,