pub struct StateTexts {
pub active: Option<String>,
pub inactive: Option<String>,
pub states: Vec<String>,
}Expand description
The object’s own names for its states, when they were read.
Fields§
§active: Option<String>A binary object’s Active_Text.
inactive: Option<String>A binary object’s Inactive_Text.
states: Vec<String>A multi-state object’s State_Text, state 1 first.
Implementations§
Source§impl StateTexts
impl StateTexts
Sourcepub fn properties(object_type: ObjectType) -> &'static [PropertyIdentifier]
pub fn properties(object_type: ObjectType) -> &'static [PropertyIdentifier]
The properties that hold an object type’s state texts, to read with the value; none for a type without them.
Sourcepub fn name(
object_type: ObjectType,
property: PropertyIdentifier,
index: Option<u32>,
) -> bool
pub fn name( object_type: ObjectType, property: PropertyIdentifier, index: Option<u32>, ) -> bool
Whether an object of object_type’s state texts would name the
value of property (at index, for an array): a binary or
multi-state object’s state, in its Present_Value, Priority_Array
slots, Relinquish_Default and the like. An array’s size, index 0,
never is. A front end reads the texts only when this holds.
Sourcepub fn cleaned(&self) -> Self
pub fn cleaned(&self) -> Self
The same texts cleaned for display (clean_name): device text
with its control characters turned to spaces and invisible format
characters dropped.
Trait Implementations§
Source§impl Clone for StateTexts
impl Clone for StateTexts
Source§impl Debug for StateTexts
impl Debug for StateTexts
Source§impl Default for StateTexts
impl Default for StateTexts
impl Eq for StateTexts
Source§impl PartialEq for StateTexts
impl PartialEq for StateTexts
impl StructuralPartialEq for StateTexts
Auto Trait Implementations§
impl Freeze for StateTexts
impl RefUnwindSafe for StateTexts
impl Send for StateTexts
impl Sync for StateTexts
impl Unpin for StateTexts
impl UnsafeUnpin for StateTexts
impl UnwindSafe for StateTexts
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more