Enum lotus_script::input::ActionState
source · #[repr(u8)]pub enum ActionState {
None = 0,
JustPressed = 1,
Pressed = 2,
JustReleased = 3,
}Expand description
The state of an action.
Variants§
Implementations§
source§impl ActionState
impl ActionState
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 ActionState
impl Clone for ActionState
source§fn clone(&self) -> ActionState
fn clone(&self) -> ActionState
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 ActionState
impl Debug for ActionState
source§impl<'de> Deserialize<'de> for ActionState
impl<'de> Deserialize<'de> for ActionState
source§fn deserialize<D>(
deserializer: D,
) -> Result<ActionState, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ActionState, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for ActionState
impl Hash for ActionState
source§impl PartialEq for ActionState
impl PartialEq for ActionState
source§fn eq(&self, other: &ActionState) -> bool
fn eq(&self, other: &ActionState) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for ActionState
impl Serialize for ActionState
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 ActionState
impl Eq for ActionState
impl StructuralPartialEq for ActionState
Auto Trait Implementations§
impl Freeze for ActionState
impl RefUnwindSafe for ActionState
impl Send for ActionState
impl Sync for ActionState
impl Unpin for ActionState
impl UnwindSafe for ActionState
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)