#[non_exhaustive]pub enum TestParam {
AllLedsWhite,
ToneGeneration,
Other(String),
}Expand description
A device-diagnostic parameter: the two flat properties on the
singleton TEST node. AllLedsWhite is a factory-test command
(writing Int(1) engages the all-LEDs-white mode; verified on Duo
fw 1.7.3, write persists across refresh); ToneGeneration selects
an internal test-tone source for audio-path verification. Both wire
types are Int; the crate types the property name only.
Firmware wire name preserves the capitalized “LEDS” (allLEDSWhite).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AllLedsWhite
ToneGeneration
Other(String)
A property without a typed TestParam identifier yet. Holds the raw wire name; the value still rides in the carrying event/command.
Implementations§
Source§impl TestParam
impl TestParam
Sourcepub fn from_known_name(name: &str) -> Option<TestParam>
pub fn from_known_name(name: &str) -> Option<TestParam>
Map a wire property name to its typed TestParam variant if known, without allocating.
Sourcepub fn is_known_name(name: &str) -> bool
pub fn is_known_name(name: &str) -> bool
Check if a wire property name matches a known TestParam variant without allocating.
Sourcepub fn from_name(name: &str) -> TestParam
pub fn from_name(name: &str) -> TestParam
Map a wire property name to its typed TestParam variant. Unknown names map to TestParam::Other, so this is total (never fails).
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
The wire property name for this parameter (inverse of TestParam::from_name).
Sourcepub fn is_known(&self) -> bool
pub fn is_known(&self) -> bool
true if this is a typed variant (not TestParam::Other).