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§
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)
Sourcefn geo_location(
&self,
_world: &dyn World,
) -> Option<(String, Option<String>, GeoLocation)>
fn geo_location( &self, _world: &dyn World, ) -> Option<(String, Option<String>, GeoLocation)>
Can be event be triggered by moving to given geo location