#[non_exhaustive]pub enum BlockMatch {
Name(String),
Names(Vec<String>),
Pred(Box<dyn Fn(Block) -> bool + Send + Sync>),
}Expand description
What Bot::find_blocks looks for: a name, several names, or a predicate.
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)
One registry name ("diamond_ore", "minecraft:chest").
Names(Vec<String>)
Any of these names.
Pred(Box<dyn Fn(Block) -> bool + Send + Sync>)
A predicate on the block.
Trait Implementations§
Source§impl Debug for BlockMatch
impl Debug for BlockMatch
Source§impl From<&[&str]> for BlockMatch
impl From<&[&str]> for BlockMatch
Source§impl From<&str> for BlockMatch
impl From<&str> for BlockMatch
Source§impl From<String> for BlockMatch
impl From<String> for BlockMatch
Auto Trait Implementations§
impl !RefUnwindSafe for BlockMatch
impl !UnwindSafe for BlockMatch
impl Forget for BlockMatch
impl Freeze for BlockMatch
impl Move for BlockMatch
impl Send for BlockMatch
impl Sync for BlockMatch
impl Unpin for BlockMatch
impl UnsafeUnpin for BlockMatch
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