Struct Bundle
Source pub struct Bundle<Content: ResourceType, const AMOUNT: u32> { }
Expand description
Contains a fixed (compile-time known) amount of a resource.
A Bundle can be used to build structures or as input for recipes.
The fixed amount of resource contained in this Bundle.
Returns the fixed amount of resource contained in this Bundle.
Splits this Bundle into two smaller Bundles with the specified amounts.
The sum of AMOUNT1 and AMOUNT2 must equal the amount of this Bundle.
Converts this Bundle into a Resource with the same resource type and amount.
The resulting type after applying the + operator.
The resulting type after applying the + operator.
The resulting type after applying the + operator.
Converts to this type from the input type.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.