Enum kll_core::CapabilityState
source · #[repr(u8)]
pub enum CapabilityState {
None,
Initial,
Last,
Any,
Passthrough,
}
Expand description
CapabilityState After voting with the indicated TriggerConditions, the CapabilityState is used by the Result capabilities to evaluate a generic decision. This mirrors CapabilityEvent, except that the Passthrough event is not stored as it is not known at compile time. If passthrough has been specified the final element of the last combo will be sent instead
Variants
None
Invalid, ignore this event
Initial
Initial state (e.g. press)
Last
Last state (e.g. release)
Any
Any activation (Initial+Last)
Passthrough
Event passthrough
Implementations
sourceimpl CapabilityState
impl CapabilityState
sourcepub fn event(&self, event: TriggerEvent) -> CapabilityEvent
pub fn event(&self, event: TriggerEvent) -> CapabilityEvent
Using a CapabilityState and TriggerEvent, generate a CapabilityEvent
Trait Implementations
sourceimpl Clone for CapabilityState
impl Clone for CapabilityState
sourcefn clone(&self) -> CapabilityState
fn clone(&self) -> CapabilityState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for CapabilityState
impl Debug for CapabilityState
sourceimpl Hash for CapabilityState
impl Hash for CapabilityState
sourceimpl PartialEq<CapabilityState> for CapabilityState
impl PartialEq<CapabilityState> for CapabilityState
sourcefn eq(&self, other: &CapabilityState) -> bool
fn eq(&self, other: &CapabilityState) -> bool
impl Copy for CapabilityState
impl Eq for CapabilityState
impl StructuralEq for CapabilityState
impl StructuralPartialEq for CapabilityState
Auto Trait Implementations
impl RefUnwindSafe for CapabilityState
impl Send for CapabilityState
impl Sync for CapabilityState
impl Unpin for CapabilityState
impl UnwindSafe for CapabilityState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more