Struct RecipeMatch
#[non_exhaustive]pub struct RecipeMatch {
pub recipe: Identifier,
pub output: ItemStack,
pub remainders: Vec<Option<ItemStack>>,
pub experience: f32,
pub processing_time: u32,
}Expand description
What the matched recipe assembles; lookup never consumes the input.
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.recipe: Identifier§output: ItemStack§remainders: Vec<Option<ItemStack>>Remaining items in input slot order after consuming one item per occupied slot.
experience: f32§processing_time: u32Recipe-file cooking time; station-specific speed adjustments are not applied here.
Implementations§
§impl RecipeMatch
impl RecipeMatch
pub fn new(
recipe: Identifier,
output: ItemStack,
remainders: Vec<Option<ItemStack>>,
experience: f32,
processing_time: u32,
) -> RecipeMatch
pub fn new( recipe: Identifier, output: ItemStack, remainders: Vec<Option<ItemStack>>, experience: f32, processing_time: u32, ) -> RecipeMatch
Build the result of an engine match.
Trait Implementations§
§impl Clone for RecipeMatch
impl Clone for RecipeMatch
§fn clone(&self) -> RecipeMatch
fn clone(&self) -> RecipeMatch
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 RecipeMatch
impl Debug for RecipeMatch
§impl PartialEq for RecipeMatch
impl PartialEq for RecipeMatch
impl StructuralPartialEq for RecipeMatch
Auto Trait Implementations§
impl Freeze for RecipeMatch
impl RefUnwindSafe for RecipeMatch
impl Send for RecipeMatch
impl Sync for RecipeMatch
impl Unpin for RecipeMatch
impl UnsafeUnpin for RecipeMatch
impl UnwindSafe for RecipeMatch
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