Enum CapabilityRun

Source
#[repr(u8)]
pub enum CapabilityRun {
Show 24 variants NoOp { state: CapabilityEvent, }, Rotate { state: CapabilityEvent, index: u8, increment: i8, }, LayerClear { state: CapabilityEvent, }, LayerState { state: CapabilityEvent, layer: u8, layer_state: State, }, LayerRotate { state: CapabilityEvent, direction: Direction, }, HidProtocol { state: CapabilityEvent, mode: Protocol, }, HidKeyboard { state: CapabilityEvent, id: Keyboard, }, HidKeyboardState { state: CapabilityEvent, id: Keyboard, key_state: State, }, HidConsumerControl { state: CapabilityEvent, id: ConsumerControl, }, HidSystemControl { state: CapabilityEvent, id: SystemControl, }, McuFlashMode { state: CapabilityEvent, }, HidLed { state: CapabilityEvent, id: LedIndicator, }, PixelAnimationControl { state: CapabilityEvent, mode: AnimationControl, }, PixelAnimationIndex { state: CapabilityEvent, index: u16, }, PixelFadeControl { state: CapabilityEvent, profile: u8, command: FadeCommand, arg: u8, }, PixelFadeLayer { state: CapabilityEvent, layer: u8, }, PixelFadeSet { state: CapabilityEvent, profile: u8, config: u8, period: u8, }, PixelGammaControl { state: CapabilityEvent, mode: GammaControl, }, PixelLedControl { state: CapabilityEvent, mode: LedControl, amount: u8, }, PixelTest { state: CapabilityEvent, test: PixelTest, index: u16, }, Analog { state: CapabilityEvent, }, HidioOpenUrl { state: CapabilityEvent, index: u16, }, HidioUnicodeString { state: CapabilityEvent, index: u16, }, HidioUnicodeState { state: CapabilityEvent, unicode: char, },
}
Expand description

CapabilityRun Used to run capabilities rather than map them out in a result guide

Variants§

§

NoOp

No-op / None action 4 bytes

Fields

§

Rotate

Rotation event trigger 6 bytes

Fields

§index: u8
§increment: i8
§

LayerClear

Clears all layer states NOTE: Does not send trigger events 4 bytes

Fields

§

LayerState

Updates layer to the specified state 6 bytes

Fields

§layer: u8
§layer_state: State
§

LayerRotate

Rotates through possible layers given the direction Uses internal state to keep track of the current layer 5 bytes

Fields

§direction: Direction
§

HidProtocol

HID Protocol Mode 5 bytes

Fields

§

HidKeyboard

USB HID keyboard event Handles press/released based on incoming state 5 bytes

§

HidKeyboardState

USB HID keyboard event Force state event 6 bytes

Fields

§key_state: State
§

HidConsumerControl

USB HID Consumer Control Event Handles press/released based on incoming state 6 bytes

§

HidSystemControl

USB HID System Control Event Handles press/released based on incoming state 5 bytes

§

McuFlashMode

Enter Flash Mode Usually jumps to the bootloader 4 bytes

Fields

§

HidLed

USB HID Led event Handles press/released based on incoming state 5 bytes

§

PixelAnimationControl

Overall animation control 5 bytes

§

PixelAnimationIndex

Activates the given indexed Animation 6 bytes

Fields

§index: u16
§

PixelFadeControl

Fade control 7 bytes

Fields

§profile: u8
§command: FadeCommand
§arg: u8
§

PixelFadeLayer

Layer fade 5 bytes

Fields

§layer: u8
§

PixelFadeSet

Fade set profile 7 bytes

Fields

§profile: u8
§config: u8
§period: u8
§

PixelGammaControl

Enable/Disable/Toggle gamma correction 5 bytes

§

PixelLedControl

LED Control 6 bytes

Fields

§amount: u8
§

PixelTest

Pixel test 7 bytes

Fields

§index: u16
§

Analog

Analog Event Always a passthrough event 4 bytes

Fields

§

HidioOpenUrl

Sends URL (using index stored unicode string) to host computer web browser 6 bytes

Fields

§index: u16
§

HidioUnicodeString

Sends Unicode string (using index stored unicode string) to host computer 6 bytes

Fields

§index: u16
§

HidioUnicodeState

Sends Unicode character with state (Press or Release) 8 bytes

Fields

§unicode: char

Implementations§

Trait Implementations§

Source§

impl Clone for CapabilityRun

Source§

fn clone(&self) -> CapabilityRun

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CapabilityRun

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Capability> for CapabilityRun

Convert Capability to CapabilityRun Used for mainly for kll validation

Source§

fn from(cap: Capability) -> Self

Converts to this type from the input type.
Source§

impl From<TriggerEvent> for CapabilityRun

Source§

fn from(event: TriggerEvent) -> Self

Converts to this type from the input type.
Source§

impl Hash for CapabilityRun

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for CapabilityRun

Source§

fn eq(&self, other: &CapabilityRun) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for CapabilityRun

Source§

impl Eq for CapabilityRun

Source§

impl StructuralPartialEq for CapabilityRun

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.