pub enum InteractAction {
RightClickBlock,
RightClickAir,
LeftClickBlock,
LeftClickAir,
}Expand description
Mirror of the API player interaction action enum.
These are the actions that can trigger a [PlayerInteractEvent].
Variants§
Implementations§
Source§impl InteractAction
impl InteractAction
Sourcepub fn matches_config(&self, allowed: &[Self]) -> bool
pub fn matches_config(&self, allowed: &[Self]) -> bool
Returns true if the given list is empty (allow-all) or contains this InteractAction.
Trait Implementations§
Source§impl Clone for InteractAction
impl Clone for InteractAction
Source§fn clone(&self) -> InteractAction
fn clone(&self) -> InteractAction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InteractAction
impl Debug for InteractAction
Source§impl<'de> Deserialize<'de> for InteractAction
impl<'de> Deserialize<'de> for InteractAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for InteractAction
impl Display for InteractAction
Source§impl From<InteractAction> for InteractAction
Convert from the upstream API InteractAction to our mirror type.
impl From<InteractAction> for InteractAction
Convert from the upstream API InteractAction to our mirror type.
Uses the debug representation as the canonical name, falling back
to RightClickBlock if the upstream type emits something unexpected.
Source§impl Hash for InteractAction
impl Hash for InteractAction
Source§impl PartialEq for InteractAction
impl PartialEq for InteractAction
Source§impl Serialize for InteractAction
impl Serialize for InteractAction
impl Copy for InteractAction
impl Eq for InteractAction
impl StructuralPartialEq for InteractAction
Auto Trait Implementations§
impl Freeze for InteractAction
impl RefUnwindSafe for InteractAction
impl Send for InteractAction
impl Sync for InteractAction
impl Unpin for InteractAction
impl UnsafeUnpin for InteractAction
impl UnwindSafe for InteractAction
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