pub enum InventoryItem {
Item(String, u32),
Magazine(String, u32, u32),
}Expand description
An item stored in a uniform, vest, or backpack
Variants§
Implementations§
Source§impl InventoryItem
impl InventoryItem
Sourcepub const fn new_magazine(class: String, count: u32, ammo: u32) -> Self
pub const fn new_magazine(class: String, count: u32, ammo: u32) -> Self
Create a new magazine
Sourcepub const fn is_magazine(&self) -> bool
pub const fn is_magazine(&self) -> bool
The item is a magazine
Trait Implementations§
Source§impl Clone for InventoryItem
impl Clone for InventoryItem
Source§fn clone(&self) -> InventoryItem
fn clone(&self) -> InventoryItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InventoryItem
impl Debug for InventoryItem
Source§impl FromArma for InventoryItem
impl FromArma for InventoryItem
Source§impl IntoArma for InventoryItem
impl IntoArma for InventoryItem
Source§impl PartialEq for InventoryItem
impl PartialEq for InventoryItem
impl Eq for InventoryItem
impl StructuralPartialEq for InventoryItem
Auto Trait Implementations§
impl Freeze for InventoryItem
impl RefUnwindSafe for InventoryItem
impl Send for InventoryItem
impl Sync for InventoryItem
impl Unpin for InventoryItem
impl UnwindSafe for InventoryItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more