pub struct MissingIngredient {
pub item: u32,
pub required: u64,
pub available: u32,
pub missing: u64,
}Expand description
One missing ingredient, aggregated across every input with the same item ID.
See preview for an example. Amounts use u64 so up to 32 u32 costs
remain exact even when the required total exceeds inventory stack limits.
Fields§
§item: u32The recipe’s item ID.
required: u64Total input cost, before any outputs are produced.
available: u32Amount currently held in the inventory.
missing: u64Exact shortfall: required - u64::from(available).
Trait Implementations§
Source§impl Clone for MissingIngredient
impl Clone for MissingIngredient
Source§fn clone(&self) -> MissingIngredient
fn clone(&self) -> MissingIngredient
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 MissingIngredient
impl Debug for MissingIngredient
Source§impl PartialEq for MissingIngredient
impl PartialEq for MissingIngredient
impl Copy for MissingIngredient
impl Eq for MissingIngredient
impl StructuralPartialEq for MissingIngredient
Auto Trait Implementations§
impl Freeze for MissingIngredient
impl RefUnwindSafe for MissingIngredient
impl Send for MissingIngredient
impl Sync for MissingIngredient
impl Unpin for MissingIngredient
impl UnwindSafe for MissingIngredient
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