pub struct Characteristic {
pub iid: u64,
pub char_type: CharacteristicType,
pub format: CharFormat,
pub perms: Perms,
pub value: Option<CharValue>,
pub unit: Option<String>,
pub min_value: Option<f64>,
pub max_value: Option<f64>,
pub min_step: Option<f64>,
pub max_len: Option<u64>,
}Expand description
One characteristic on a service.
Fields§
§iid: u64Characteristic instance id (unique within the accessory).
char_type: CharacteristicTypeThe HAP characteristic type (decoded from the short type UUID).
format: CharFormatThe value format.
perms: PermsPermissions.
value: Option<CharValue>The current value, if the accessory included one and it decoded under
format. None if absent.
unit: Option<String>Optional unit string (e.g. "percentage", "celsius").
min_value: Option<f64>Optional minimum value constraint.
max_value: Option<f64>Optional maximum value constraint.
min_step: Option<f64>Optional step constraint.
max_len: Option<u64>Optional maximum length (for string/data formats).
Trait Implementations§
Source§impl Clone for Characteristic
impl Clone for Characteristic
Source§fn clone(&self) -> Characteristic
fn clone(&self) -> Characteristic
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Characteristic
impl Debug for Characteristic
Source§impl PartialEq for Characteristic
impl PartialEq for Characteristic
Source§fn eq(&self, other: &Characteristic) -> bool
fn eq(&self, other: &Characteristic) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Characteristic
Auto Trait Implementations§
impl Freeze for Characteristic
impl RefUnwindSafe for Characteristic
impl Send for Characteristic
impl Sync for Characteristic
impl Unpin for Characteristic
impl UnsafeUnpin for Characteristic
impl UnwindSafe for Characteristic
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