pub struct ItemStack {
pub template_id: String,
pub quantity: u32,
pub item_instance_id: Option<Uuid>,
pub props: BTreeMap<String, String>,
pub contents: Vec<ItemStack>,
pub display_name: Option<String>,
pub category: Option<String>,
pub base_mass: Option<f32>,
pub base_volume: Option<f32>,
pub capacity_volume: Option<f32>,
pub stackable: Option<bool>,
}Fields§
§template_id: String§quantity: u32§item_instance_id: Option<Uuid>Stable instance id — preserved across checkpoint/sync when set.
props: BTreeMap<String, String>Per-instance metadata (stat rolls, soul-bind, lock ids, etc.).
contents: Vec<ItemStack>Nested contents when this stack is a container instance.
display_name: Option<String>From item catalog when sent on wire (display only).
category: Option<String>From item catalog when sent on wire (weapon, consumable, …).
base_mass: Option<f32>Per-unit mass in kg from catalog (display / move UX).
base_volume: Option<f32>Per-unit volume from catalog (display / move UX).
capacity_volume: Option<f32>Container capacity when this stack is a container template.
stackable: Option<bool>Whether the template stacks in inventory (from catalog).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ItemStack
impl<'de> Deserialize<'de> for ItemStack
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ItemStack
Auto Trait Implementations§
impl Freeze for ItemStack
impl RefUnwindSafe for ItemStack
impl Send for ItemStack
impl Sync for ItemStack
impl Unpin for ItemStack
impl UnsafeUnpin for ItemStack
impl UnwindSafe for ItemStack
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