Enum lotus_script::input::ActionStateKind
source · #[repr(u8)]pub enum ActionStateKind {
None = 0,
JustPressed = 1,
Pressed = 2,
JustReleased = 3,
}
Expand description
The state kind of an action.
Variants§
None = 0
The action is not being performed.
JustPressed = 1
The action has just been pressed.
Pressed = 2
The action is currently pressed.
JustReleased = 3
The action has just been released.
Implementations§
source§impl ActionStateKind
impl ActionStateKind
sourcepub fn is_just_pressed(self) -> bool
pub fn is_just_pressed(self) -> bool
Returns true
if the action has just been pressed.
sourcepub fn is_pressed(self) -> bool
pub fn is_pressed(self) -> bool
Returns true
if the action is currently pressed.
sourcepub fn is_just_released(self) -> bool
pub fn is_just_released(self) -> bool
Returns true
if the action has just been released.
sourcepub fn is_released(self) -> bool
pub fn is_released(self) -> bool
Returns true
if the action is currently released.
Trait Implementations§
source§impl Clone for ActionStateKind
impl Clone for ActionStateKind
source§fn clone(&self) -> ActionStateKind
fn clone(&self) -> ActionStateKind
Returns a copy 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 ActionStateKind
impl Debug for ActionStateKind
source§impl<'de> Deserialize<'de> for ActionStateKind
impl<'de> Deserialize<'de> for ActionStateKind
source§fn deserialize<D>(
deserializer: D
) -> Result<ActionStateKind, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<ActionStateKind, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for ActionStateKind
impl Hash for ActionStateKind
source§impl PartialEq for ActionStateKind
impl PartialEq for ActionStateKind
source§fn eq(&self, other: &ActionStateKind) -> bool
fn eq(&self, other: &ActionStateKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ActionStateKind
impl Serialize for ActionStateKind
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for ActionStateKind
impl Eq for ActionStateKind
impl StructuralPartialEq for ActionStateKind
Auto Trait Implementations§
impl Freeze for ActionStateKind
impl RefUnwindSafe for ActionStateKind
impl Send for ActionStateKind
impl Sync for ActionStateKind
impl Unpin for ActionStateKind
impl UnwindSafe for ActionStateKind
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