pub struct Cid(/* private fields */);Expand description
One HID++ 0x1b04 control, by its firmware control ID.
Distinct from the HID++ layer’s own ControlId on purpose: this is the
config-facing identity of a rebindable control, and the two crates never
depend on each other.
Implementations§
Source§impl Cid
impl Cid
Sourcepub fn known(self) -> Option<&'static KnownControl>
pub fn known(self) -> Option<&'static KnownControl>
The catalog row for this control, when OpenLogi knows it.
Sourcepub fn from_config_name(name: &str) -> Option<Self>
pub fn from_config_name(name: &str) -> Option<Self>
The control a config name denotes: a catalog name such as
KeyScreenCapture, or the control:0x… form any control has.
Sourcepub fn config_name(self) -> Cow<'static, str>
pub fn config_name(self) -> Cow<'static, str>
The name this control is written with in config.toml: its catalog
name when it has one, else control:0x…. Stable — a control that later
gains a catalog row keeps loading under its numeric name.
Sourcepub fn label(self) -> Cow<'static, str>
pub fn label(self) -> Cow<'static, str>
English label for logs and non-localized contexts. An uncataloged
control is named by number — Control 0x01f3, deliberately not the
control:0x01f3 config form, so a label pasted into config.toml
fails to parse instead of half-working.
Sourcepub fn translation_key(self) -> &'static str
pub fn translation_key(self) -> &'static str
Stable catalog key for the localized label. An uncataloged control
resolves to UNKNOWN_CONTROL_TRANSLATION_KEY, the plain word
“Control”; callers that show the number append Cid::hex.
Trait Implementations§
impl Copy for Cid
impl Eq for Cid
Source§impl Ord for Cid
impl Ord for Cid
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Cid
impl PartialOrd for Cid
impl StructuralPartialEq for Cid
Auto Trait Implementations§
impl Freeze for Cid
impl RefUnwindSafe for Cid
impl Send for Cid
impl Sync for Cid
impl Unpin for Cid
impl UnsafeUnpin for Cid
impl UnwindSafe for Cid
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.