pub trait Predicate: Sized + Clone {
// Required method
fn should(&mut self, ctx: &mut NpcCtx<'_, '_>) -> bool;
// Provided methods
fn chance(self, chance: f32) -> Chance<Self> { ... }
fn time_hint(&self) -> Option<f32> { ... }
}
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.