pub trait LootModifier: Debug {
// Required methods
fn modify_weight(
&self,
item_id: u32,
base_weight: f32,
context: &LootContext,
) -> f32;
fn modifier_name(&self) -> &str;
}Required Methods§
fn modify_weight( &self, item_id: u32, base_weight: f32, context: &LootContext, ) -> f32
fn modifier_name(&self) -> &str
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".