pub struct DevicePropDesc {
pub property_code: DevicePropertyCode,
pub data_type: PropertyDataType,
pub writable: bool,
pub default_value: PropertyValue,
pub current_value: PropertyValue,
pub form_type: PropertyFormType,
pub enum_values: Option<Vec<PropertyValue>>,
pub range: Option<PropertyRange>,
}Expand description
Device property descriptor.
Describes a device property including its type, current value, default value, and allowed values/ranges.
Returned by the GetDevicePropDesc operation.
Fields§
§property_code: DevicePropertyCodeProperty code identifying this property.
data_type: PropertyDataTypeData type of the property value.
writable: boolWhether the property is writable (true) or read-only (false).
default_value: PropertyValueDefault/factory value.
current_value: PropertyValueCurrent value.
form_type: PropertyFormTypeForm type (None, Range, or Enumeration).
enum_values: Option<Vec<PropertyValue>>Allowed values (if form_type is Enumeration).
range: Option<PropertyRange>Value range (if form_type is Range).
Implementations§
Source§impl DevicePropDesc
impl DevicePropDesc
Sourcepub fn from_bytes(buf: &[u8]) -> Result<Self, Error>
pub fn from_bytes(buf: &[u8]) -> Result<Self, Error>
Parse a DevicePropDesc from bytes.
The buffer should contain the DevicePropDesc dataset as returned by GetDevicePropDesc.
Trait Implementations§
Source§impl Clone for DevicePropDesc
impl Clone for DevicePropDesc
Source§fn clone(&self) -> DevicePropDesc
fn clone(&self) -> DevicePropDesc
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DevicePropDesc
impl RefUnwindSafe for DevicePropDesc
impl Send for DevicePropDesc
impl Sync for DevicePropDesc
impl Unpin for DevicePropDesc
impl UnsafeUnpin for DevicePropDesc
impl UnwindSafe for DevicePropDesc
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
Mutably borrows from an owned value. Read more