Trait veloren_common::comp::inventory::item::ItemDesc

source ·
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§

source

fn description(&self) -> &str

👎Deprecated: since item i18n
source

fn name(&self) -> Cow<'_, str>

👎Deprecated: since item i18n
source

fn kind(&self) -> Cow<'_, ItemKind>

source

fn amount(&self) -> NonZeroU32

source

fn quality(&self) -> Quality

source

fn num_slots(&self) -> u16

source

fn item_definition_id(&self) -> ItemDefinitionId<'_>

source

fn tags(&self) -> Vec<ItemTag>

source

fn is_modular(&self) -> bool

source

fn components(&self) -> &[Item]

source

fn has_durability(&self) -> bool

source

fn durability_lost(&self) -> Option<u32>

source

fn stats_durability_multiplier(&self) -> DurabilityMultiplier

Provided Methods§

source

fn tool_info(&self) -> Option<ToolKind>

source

fn i18n(&self, i18n: &ItemI18n) -> (Content, Content)

Return name’s and description’s localization descriptors

Implementations on Foreign Types§

source§

impl<'a, T: ItemDesc + ?Sized> ItemDesc for &'a T

source§

fn description(&self) -> &str

👎Deprecated: since item i18n
source§

fn name(&self) -> Cow<'_, str>

👎Deprecated: since item i18n
source§

fn kind(&self) -> Cow<'_, ItemKind>

source§

fn amount(&self) -> NonZeroU32

source§

fn quality(&self) -> Quality

source§

fn num_slots(&self) -> u16

source§

fn item_definition_id(&self) -> ItemDefinitionId<'_>

source§

fn tags(&self) -> Vec<ItemTag>

source§

fn is_modular(&self) -> bool

source§

fn components(&self) -> &[Item]

source§

fn has_durability(&self) -> bool

source§

fn durability_lost(&self) -> Option<u32>

source§

fn stats_durability_multiplier(&self) -> DurabilityMultiplier

Implementors§