Enum InteractionKey
#[non_exhaustive]pub enum InteractionKey {
Attack,
Use,
PickBlock,
}Expand description
The key of InteractionKeyMappingTriggered: what the player’s click was about to do.
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.
Attack
key.attack: an attack, or a held key digging on.
Use
key.use: once for each hand tried, the main hand first.
PickBlock
key.pickItem: only with a block or entity aimed at.
Trait Implementations§
§impl Clone for InteractionKey
impl Clone for InteractionKey
§fn clone(&self) -> InteractionKey
fn clone(&self) -> InteractionKey
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 moreimpl Copy for InteractionKey
§impl Debug for InteractionKey
impl Debug for InteractionKey
impl Eq for InteractionKey
§impl PartialEq for InteractionKey
impl PartialEq for InteractionKey
impl StructuralPartialEq for InteractionKey
Auto Trait Implementations§
impl Freeze for InteractionKey
impl RefUnwindSafe for InteractionKey
impl Send for InteractionKey
impl Sync for InteractionKey
impl Unpin for InteractionKey
impl UnsafeUnpin for InteractionKey
impl UnwindSafe for InteractionKey
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