[−][src]Struct hap::accessory::AccessoryInformation
The AccessoryInformationInformation struct is used to store metadata about an Accessory and is converted to the
Accessory Information Service of the Accessory it is passed to on its creation.
Examples
use hap::accessory::{outlet::OutletAccessory, AccessoryInformation}; let information = AccessoryInformation { manufacturer: "Acme".into(), model: "A1234".into(), name: "Acme Outlet".into(), serial_number: "1A2B3C4D5E6F".into(), ..Default::default() }; let outlet = OutletAccessory::new(1, information).unwrap();
Fields
manufacturer: StringContains the name of the company whose brand will appear on the Accessory, e.g., "Acme".
model: StringContains the manufacturer-specific model of the Accessory, e.g. "A1234".
name: StringDescribes the name of the Accessory.
serial_number: StringContains the manufacturer-specific serial number of the Accessory, e.g. "1A2B3C4D5E6F".
The length must be greater than 1.
firmware_revision: StringDescribes a firmware revision string x[.y[.z]] (e.g. "100.1.1"):
is the major version number, required. is the minor version number, required if it is non-zero or if is present. is the revision version number, required if non-zero.
The firmware revision must follow the below rules:
is incremented when there is significant change. e.g.,1.0.0, 2.0.0, 3.0.0, etc. is incremented when minor changes are introduced such as 1.1.0, 2.1.0, 3.1.0 etc. is incremented when bug-fixes are introduced such as 1.0.1, 2.0.1, 3.0.1 etc. - Subsequent firmware updates can have a lower
version only if is incremented - Subsequent firmware updates can have a lower
version only if or is incremented
The value must change after every firmware update.
hardware_revision: Option<String>Describes a hardware revision string x[.y[.z]] (e.g. "100.1.1") and tracked when the board or components of the same accessory is changed:
is the major version number, required. is the minor version number, required if it is non-zero or if is present. is the revision version number, required if non-zero.
The hardware revision must follow the below rules:
is incremented when there is significant change. e.g.,1.0.0, 2.0.0, 3.0.0, etc. is incremented when minor changes are introduced such as 1.1.0, 2.1.0, 3.1.0 etc. is incremented when bug-fixes are introduced such as 1.0.1, 2.0.1, 3.0.1 etc. - Subsequent firmware updates can have a lower
version only if is incremented - Subsequent firmware updates can have a lower
version only if or is incremented
The value must change after every hardware update.
accessory_flags: Option<u32>When set indicates accessory requires additional setup. Use of Accessory Flags requires written approval by Apple in advance.
Trait Implementations
impl Debug for AccessoryInformation[src]
impl Default for AccessoryInformation[src]
Auto Trait Implementations
impl RefUnwindSafe for AccessoryInformation
impl Send for AccessoryInformation
impl Sync for AccessoryInformation
impl Unpin for AccessoryInformation
impl UnwindSafe for AccessoryInformation
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,