Enum winput::Action [−][src]
pub enum Action { Press, Release, }
Represents an action that can be taken on a key or button.
Variants
The action of pressing the key.
The action of releasing the key.
Implementations
impl Action
[src]
impl Action
[src]pub fn from_press(is_press: bool) -> Self
[src]
Creates a new Action
from the given bool
.
- If
is_press
istrue
,Action::Press
is returned. - If
is_press
isfalse
,Action::Release
is returned.
Example
use winput::Action; assert_eq!(Action::from_press(true), Action::Press); assert_eq!(Action::from_press(false), Action::Release);
pub fn from_release(is_release: bool) -> Self
[src]
Trait Implementations
impl StructuralEq for Action
[src]
impl StructuralEq for Action
[src]impl StructuralPartialEq for Action
[src]
impl StructuralPartialEq for Action
[src]Auto Trait Implementations
impl RefUnwindSafe for Action
impl RefUnwindSafe for Action
impl UnwindSafe for Action
impl UnwindSafe for Action