Skip to main content

Response

Enum Response 

Source
pub enum Response {
Show 54 variants Devices(Vec<DeviceInfo>), Macros(Vec<MacroEntry>), Ack, Status { version: String, uptime_seconds: u64, devices_count: usize, macros_count: usize, }, RecordingStarted { device_path: String, name: String, }, RecordingStopped { macro_entry: MacroEntry, }, Profiles(Vec<String>), ProfileLoaded { name: String, macros_count: usize, }, ProfileSaved { name: String, macros_count: usize, }, Error(String), Token(String), Authenticated, DeviceProfiles { device_id: String, profiles: Vec<String>, }, ProfileActivated { device_id: String, profile_name: String, }, ProfileDeactivated { device_id: String, }, ActiveProfile { device_id: String, profile_name: Option<String>, }, ActiveRemaps { device_path: String, profile_name: Option<String>, remaps: Vec<RemapEntry>, }, RemapProfiles { device_path: String, profiles: Vec<RemapProfileInfo>, }, RemapProfileActivated { device_path: String, profile_name: String, }, RemapProfileDeactivated { device_path: String, }, DeviceCapabilities { device_path: String, capabilities: DeviceCapabilities, }, ActiveLayer { device_id: String, layer_id: usize, layer_name: String, }, LayerConfigured { device_id: String, layer_id: usize, }, LayerList { device_id: String, layers: Vec<LayerConfigInfo>, }, AnalogSensitivitySet { device_id: String, sensitivity: f32, }, AnalogSensitivity { device_id: String, sensitivity: f32, }, AnalogResponseCurveSet { device_id: String, curve: String, }, AnalogResponseCurve { device_id: String, curve: String, }, AnalogDeadzoneSet { device_id: String, percentage: u8, }, AnalogDeadzone { device_id: String, percentage: u8, }, AnalogDeadzoneXYSet { device_id: String, x_percentage: u8, y_percentage: u8, }, AnalogDeadzoneXY { device_id: String, x_percentage: u8, y_percentage: u8, }, AnalogOuterDeadzoneXYSet { device_id: String, x_percentage: u8, y_percentage: u8, }, AnalogOuterDeadzoneXY { device_id: String, x_percentage: u8, y_percentage: u8, }, AnalogDpadModeSet { device_id: String, mode: String, }, AnalogDpadMode { device_id: String, mode: String, }, LedColorSet { device_id: String, zone: LedZone, color: (u8, u8, u8), }, LedColor { device_id: String, zone: LedZone, color: Option<(u8, u8, u8)>, }, AllLedColors { device_id: String, colors: HashMap<LedZone, (u8, u8, u8)>, }, LedBrightnessSet { device_id: String, zone: Option<LedZone>, brightness: u8, }, LedBrightness { device_id: String, zone: Option<LedZone>, brightness: u8, }, LedPatternSet { device_id: String, pattern: LedPattern, }, LedPattern { device_id: String, pattern: LedPattern, }, FocusChangedAck { app_id: String, }, HotkeyRegistered { device_id: String, key: String, modifiers: Vec<String>, }, HotkeyList { device_id: String, bindings: Vec<HotkeyBinding>, }, HotkeyRemoved { device_id: String, key: String, modifiers: Vec<String>, }, AutoSwitchRulesAck, AutoSwitchRules { rules: Vec<AutoSwitchRule>, }, AnalogCalibration { device_id: String, layer_id: usize, calibration: Option<AnalogCalibrationConfig>, }, AnalogCalibrationAck, AnalogInputUpdate { device_id: String, axis_x: f32, axis_y: f32, }, AnalogInputSubscribed, MacroSettings(MacroSettings),
}
Expand description

IPC Responses from Daemon to GUI

Variants§

§

Devices(Vec<DeviceInfo>)

List of discovered devices

§

Macros(Vec<MacroEntry>)

List of configured macros

§

Ack

Acknowledgment of successful operation

§

Status

Status information

Fields

§version: String
§uptime_seconds: u64
§devices_count: usize
§macros_count: usize
§

RecordingStarted

Notification that recording has started

Fields

§device_path: String
§name: String
§

RecordingStopped

Notification that recording has stopped

Fields

§macro_entry: MacroEntry
§

Profiles(Vec<String>)

List of available profiles

§

ProfileLoaded

Profile load confirmation

Fields

§name: String
§macros_count: usize
§

ProfileSaved

Profile save confirmation

Fields

§name: String
§macros_count: usize
§

Error(String)

Error response

§

Token(String)

Authentication token

§

Authenticated

Authentication successful

§

DeviceProfiles

List of available profiles for a device

Fields

§device_id: String
§profiles: Vec<String>
§

ProfileActivated

Profile activation confirmation

Fields

§device_id: String
§profile_name: String
§

ProfileDeactivated

Profile deactivation confirmation

Fields

§device_id: String
§

ActiveProfile

Current active profile for a device

Fields

§device_id: String
§profile_name: Option<String>
§

ActiveRemaps

Active remap configuration

Fields

§device_path: String
§profile_name: Option<String>
§remaps: Vec<RemapEntry>
§

RemapProfiles

List of available profiles

Fields

§device_path: String
§

RemapProfileActivated

Remap profile activation confirmation

Fields

§device_path: String
§profile_name: String
§

RemapProfileDeactivated

Remap profile deactivation confirmation

Fields

§device_path: String
§

DeviceCapabilities

Device capability information

Fields

§device_path: String
§capabilities: DeviceCapabilities
§

ActiveLayer

Current active layer for a device

Fields

§device_id: String
§layer_id: usize
§layer_name: String
§

LayerConfigured

Layer configuration confirmation

Fields

§device_id: String
§layer_id: usize
§

LayerList

List of configured layers for a device

Fields

§device_id: String
§

AnalogSensitivitySet

Analog sensitivity set confirmation

Fields

§device_id: String
§sensitivity: f32
§

AnalogSensitivity

Analog sensitivity response

Fields

§device_id: String
§sensitivity: f32
§

AnalogResponseCurveSet

Analog response curve set confirmation

Fields

§device_id: String
§curve: String
§

AnalogResponseCurve

Analog response curve response

Fields

§device_id: String
§curve: String
§

AnalogDeadzoneSet

Analog deadzone set confirmation

Fields

§device_id: String
§percentage: u8
§

AnalogDeadzone

Analog deadzone response

Fields

§device_id: String
§percentage: u8
§

AnalogDeadzoneXYSet

Per-axis deadzone set confirmation

Fields

§device_id: String
§x_percentage: u8
§y_percentage: u8
§

AnalogDeadzoneXY

Per-axis deadzone response

Fields

§device_id: String
§x_percentage: u8
§y_percentage: u8
§

AnalogOuterDeadzoneXYSet

Per-axis outer deadzone set confirmation

Fields

§device_id: String
§x_percentage: u8
§y_percentage: u8
§

AnalogOuterDeadzoneXY

Per-axis outer deadzone response

Fields

§device_id: String
§x_percentage: u8
§y_percentage: u8
§

AnalogDpadModeSet

D-pad mode set confirmation

Fields

§device_id: String
§mode: String
§

AnalogDpadMode

D-pad mode response

Fields

§device_id: String
§mode: String
§

LedColorSet

LED color set confirmation

Fields

§device_id: String
§zone: LedZone
§color: (u8, u8, u8)
§

LedColor

LED color response

Fields

§device_id: String
§zone: LedZone
§color: Option<(u8, u8, u8)>
§

AllLedColors

All LED colors response

Fields

§device_id: String
§colors: HashMap<LedZone, (u8, u8, u8)>
§

LedBrightnessSet

LED brightness set confirmation

Fields

§device_id: String
§brightness: u8
§

LedBrightness

LED brightness response

Fields

§device_id: String
§brightness: u8
§

LedPatternSet

LED pattern set confirmation

Fields

§device_id: String
§pattern: LedPattern
§

LedPattern

LED pattern response

Fields

§device_id: String
§pattern: LedPattern
§

FocusChangedAck

Acknowledgment of focus change event

Fields

§app_id: String
§

HotkeyRegistered

Hotkey registration successful

Fields

§device_id: String
§modifiers: Vec<String>
§

HotkeyList

List of hotkey bindings for a device

Fields

§device_id: String
§bindings: Vec<HotkeyBinding>
§

HotkeyRemoved

Hotkey removal successful

Fields

§device_id: String
§modifiers: Vec<String>
§

AutoSwitchRulesAck

Auto-switch rules acknowledgment

§

AutoSwitchRules

Auto-switch rules response

Fields

§

AnalogCalibration

Analog calibration response

Fields

§device_id: String
§layer_id: usize
§

AnalogCalibrationAck

Analog calibration acknowledgment

§

AnalogInputUpdate

Analog input update (streamed to subscribers)

Fields

§device_id: String
§axis_x: f32
§axis_y: f32
§

AnalogInputSubscribed

Analog subscription acknowledgment

§

MacroSettings(MacroSettings)

Global macro settings response

Trait Implementations§

Source§

impl Clone for Response

Source§

fn clone(&self) -> Response

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Response

Source§

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

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

impl<'de> Deserialize<'de> for Response

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Response

Source§

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

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

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 Serialize for Response

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Response

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,