Skip to main content

SuspendedCommand

Trait SuspendedCommand 

Source
pub trait SuspendedCommand: Send + 'static {
    // Required method
    fn poll(&mut self) -> SuspendedCommandPoll;

    // Provided methods
    fn order(&self) -> CommandSuspensionOrder { ... }
    fn cancel(&mut self) { ... }
}
Expand description

Cross-tick command work owned and cancelled by Steel’s command scheduler.

Required Methods§

Source

fn poll(&mut self) -> SuspendedCommandPoll

Polls the command once from the server tick.

Provided Methods§

Source

fn order(&self) -> CommandSuspensionOrder

Returns which later top-level commands must wait for this work.

Source

fn cancel(&mut self)

Cancels retained external work when the command or server stops.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§