Event

Trait Event 

Source
pub trait Event:
    Tagged
    + AsAny
    + Debug
    + PartialEq<[u8]> {
Show 21 methods // Required methods fn name(&self) -> &str; fn set_world_updates(&mut self, updates: Vec<Box<dyn Change>>); fn set_condition(&mut self, condition: Condition); fn get_world_updates(&self) -> &[Box<dyn Change>]; fn get_condition(&self) -> &Condition; fn initiator(&self) -> String; fn set_initiator(&mut self, initiator: String); fn dump(&self) -> Value; fn matches(&self, value: &Value) -> bool; fn items(&self) -> Vec<String>; fn characters(&self) -> Vec<String>; // Provided methods fn kind(&self) -> &str { ... } fn can_be_triggered(&self, world: &dyn World) -> bool { ... } fn trigger(&mut self, world: &mut dyn World) { ... } fn perform(&mut self, world: &mut dyn World) -> bool { ... } fn action_text(&self, world: &dyn World) -> String { ... } fn success_text(&self, world: &dyn World) -> String { ... } fn fail_text(&self, world: &dyn World) -> String { ... } fn msg_base(&self, world: &dyn World) -> String { ... } fn sort_key(&self, world: &dyn World) -> (usize, String, String, String) { ... } fn geo_location( &self, _world: &dyn World, ) -> Option<(String, Option<String>, GeoLocation)> { ... }
}

Required Methods§

Source

fn name(&self) -> &str

Source

fn set_world_updates(&mut self, updates: Vec<Box<dyn Change>>)

Source

fn set_condition(&mut self, condition: Condition)

Source

fn get_world_updates(&self) -> &[Box<dyn Change>]

Source

fn get_condition(&self) -> &Condition

Source

fn initiator(&self) -> String

Source

fn set_initiator(&mut self, initiator: String)

Source

fn dump(&self) -> Value

Source

fn matches(&self, value: &Value) -> bool

Source

fn items(&self) -> Vec<String>

Source

fn characters(&self) -> Vec<String>

Provided Methods§

Source

fn kind(&self) -> &str

Source

fn can_be_triggered(&self, world: &dyn World) -> bool

Source

fn trigger(&mut self, world: &mut dyn World)

Source

fn perform(&mut self, world: &mut dyn World) -> bool

Source

fn action_text(&self, world: &dyn World) -> String

Source

fn success_text(&self, world: &dyn World) -> String

Source

fn fail_text(&self, world: &dyn World) -> String

Source

fn msg_base(&self, world: &dyn World) -> String

Source

fn sort_key(&self, world: &dyn World) -> (usize, String, String, String)

Source

fn geo_location( &self, _world: &dyn World, ) -> Option<(String, Option<String>, GeoLocation)>

Can be event be triggered by moving to given geo location

Implementors§