pub trait Script {
// Provided methods
fn init(&mut self) { ... }
fn actions() -> Vec<RegisterAction> { ... }
fn tick(&mut self) { ... }
fn on_message(&mut self, msg: Message) { ... }
}Expand description
Haupt-Trait für LOTUS-Script-Implementierungen.
Main trait for LOTUS script implementations.
Provided Methods§
Sourcefn init(&mut self)
fn init(&mut self)
Wird einmal beim Laden des Scripts aufgerufen.
Called once when the script is loaded.
Sourcefn actions() -> Vec<RegisterAction>
fn actions() -> Vec<RegisterAction>
Registriert Eingabeaktionen; Standard: leere Liste.
Registers input actions; defaults to an empty list.
Sourcefn on_message(&mut self, msg: Message)
fn on_message(&mut self, msg: Message)
Verarbeitet eine eingehende Nachricht.
Handles an incoming message.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".