Struct RecipeTemplate
#[non_exhaustive]pub struct RecipeTemplate {
pub item: Option<String>,
pub count: u32,
pub components: Option<Tag>,
}Expand description
An ItemStackTemplate in a crafting rule, not an assembled result.
The rule decides which input supplies inherited components and, when
item is absent, the result item. Use crate::LevelRef::recipe_for for an
actual grid’s output and remainders.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.item: Option<String>Replacement item, or None to keep the rule’s input item.
count: u32Template count, before any material-count addition.
components: Option<Tag>Component patch applied after inherited components, including explicit
removals (!component) and zero values; None for no patch.
Implementations§
§impl RecipeTemplate
impl RecipeTemplate
Trait Implementations§
§impl Clone for RecipeTemplate
impl Clone for RecipeTemplate
§fn clone(&self) -> RecipeTemplate
fn clone(&self) -> RecipeTemplate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for RecipeTemplate
impl Debug for RecipeTemplate
Auto Trait Implementations§
impl Freeze for RecipeTemplate
impl RefUnwindSafe for RecipeTemplate
impl Send for RecipeTemplate
impl Sync for RecipeTemplate
impl Unpin for RecipeTemplate
impl UnsafeUnpin for RecipeTemplate
impl UnwindSafe for RecipeTemplate
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