pub trait Goal: Send {
// Required methods
fn controls(&self) -> GoalControls;
fn can_use(&mut self, mob: &dyn PathfinderMob) -> bool;
// Provided methods
fn can_continue_to_use(&mut self, mob: &dyn PathfinderMob) -> bool { ... }
fn is_interruptable(&self) -> bool { ... }
fn is_panic_goal(&self) -> bool { ... }
fn start(&mut self, _mob: &dyn PathfinderMob) { ... }
fn stop(&mut self, _mob: &dyn PathfinderMob) { ... }
fn requires_update_every_tick(&self) -> bool { ... }
fn tick(&mut self, _mob: &dyn PathfinderMob) { ... }
}Required Methods§
fn controls(&self) -> GoalControls
fn can_use(&mut self, mob: &dyn PathfinderMob) -> bool
Provided Methods§
fn can_continue_to_use(&mut self, mob: &dyn PathfinderMob) -> bool
fn is_interruptable(&self) -> bool
fn is_panic_goal(&self) -> bool
fn start(&mut self, _mob: &dyn PathfinderMob)
fn stop(&mut self, _mob: &dyn PathfinderMob)
fn requires_update_every_tick(&self) -> bool
fn tick(&mut self, _mob: &dyn PathfinderMob)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".