pub trait ItemDesc {
Show 15 methods
// Required methods
fn description(&self) -> &str;
fn name(&self) -> Cow<'_, str>;
fn kind(&self) -> Cow<'_, ItemKind>;
fn amount(&self) -> NonZeroU32;
fn quality(&self) -> Quality;
fn num_slots(&self) -> u16;
fn item_definition_id(&self) -> ItemDefinitionId<'_>;
fn tags(&self) -> Vec<ItemTag>;
fn is_modular(&self) -> bool;
fn components(&self) -> &[Item];
fn has_durability(&self) -> bool;
fn durability_lost(&self) -> Option<u32>;
fn stats_durability_multiplier(&self) -> DurabilityMultiplier;
// Provided methods
fn tool_info(&self) -> Option<ToolKind> { ... }
fn i18n(&self, i18n: &ItemI18n) -> (Content, Content) { ... }
}
Expand description
Provides common methods providing details about an item definition
for either an Item
containing the definition, or the actual ItemDef
Required Methods§
fn description(&self) -> &str
👎Deprecated: since item i18n
fn name(&self) -> Cow<'_, str>
👎Deprecated: since item i18n
fn kind(&self) -> Cow<'_, ItemKind>
fn amount(&self) -> NonZeroU32
fn quality(&self) -> Quality
fn num_slots(&self) -> u16
fn item_definition_id(&self) -> ItemDefinitionId<'_>
fn is_modular(&self) -> bool
fn components(&self) -> &[Item]
fn has_durability(&self) -> bool
fn durability_lost(&self) -> Option<u32>
fn stats_durability_multiplier(&self) -> DurabilityMultiplier
Provided Methods§
Implementations on Foreign Types§
source§impl<'a, T: ItemDesc + ?Sized> ItemDesc for &'a T
impl<'a, T: ItemDesc + ?Sized> ItemDesc for &'a T
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated: since item i18n