#[non_exhaustive]pub enum ItemMatch {
Name(String),
Id(i32),
Pred(Arc<dyn Fn(&Stack) -> bool + Send + Sync>),
}Expand description
What an item helper looks for: a registry name, an item id of the session’s version, or a predicate on the stack.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Name(String)
A registry name ("diamond_pickaxe", "minecraft:bread"), resolved per version.
Id(i32)
An item id of the session’s version.
Pred(Arc<dyn Fn(&Stack) -> bool + Send + Sync>)
A predicate.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ItemMatch
impl !UnwindSafe for ItemMatch
impl Forget for ItemMatch
impl Freeze for ItemMatch
impl Move for ItemMatch
impl Send for ItemMatch
impl Sync for ItemMatch
impl Unpin for ItemMatch
impl UnsafeUnpin for ItemMatchwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<dyn Fn(&Stack) -> bool + Send + Sync> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(&Stack) -> bool + Send + Sync>>: UnsafeUnpin,
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