Skip to main content

CharacteristicType

Enum CharacteristicType 

Source
#[non_exhaustive]
pub enum CharacteristicType {
Show 128 variants AdministratorOnlyAccess, AudioFeedback, Brightness, CoolingThresholdTemperature, CurrentDoorState, CurrentHeatingCoolingState, CurrentRelativeHumidity, CurrentTemperature, HeatingThresholdTemperature, Hue, Identify, LockControlPoint, LockManagementAutoSecurityTimeout, LockLastKnownAction, LockCurrentState, LockTargetState, Logs, Manufacturer, Model, MotionDetected, Name, ObstructionDetected, On, OutletInUse, RotationDirection, RotationSpeed, Saturation, SerialNumber, TargetDoorState, TargetHeatingCoolingState, TargetRelativeHumidity, TargetTemperature, TemperatureDisplayUnits, Version, PairSetup, PairVerify, PairingFeatures, PairingPairings, FirmwareRevision, HardwareRevision, AirParticulateDensity, AirParticulateSize, SecuritySystemCurrentState, SecuritySystemTargetState, BatteryLevel, CarbonMonoxideDetected, ContactSensorState, CurrentAmbientLightLevel, CurrentHorizontalTiltAngle, CurrentPosition, CurrentVerticalTiltAngle, HoldPosition, LeakDetected, OccupancyDetected, PositionState, ProgrammableSwitchEvent, StatusActive, SmokeDetected, StatusFault, StatusJammed, StatusLowBattery, StatusTampered, TargetHorizontalTiltAngle, TargetPosition, TargetVerticalTiltAngle, SecuritySystemAlarmType, ChargingState, CarbonMonoxideLevel, CarbonMonoxidePeakLevel, CarbonDioxideDetected, CarbonDioxideLevel, CarbonDioxidePeakLevel, AirQuality, AccessoryFlags, LockPhysicalControls, TargetAirPurifierState, CurrentAirPurifierState, CurrentSlatState, FilterLifeLevel, FilterChangeIndication, ResetFilterIndication, TargetAirQuality, CurrentFanState, Active, CurrentHeaterCoolerState, TargetHeaterCoolerState, CurrentHumidifierDehumidifierState, TargetHumidifierDehumidifierState, WaterLevel, SwingMode, TargetSlatState, TargetFanState, SlatType, CurrentTiltAngle, TargetTiltAngle, OzoneDensity, NitrogenDioxideDensity, SulphurDioxideDensity, Pm25Density, Pm10Density, VocDensity, RelativeHumidityDehumidifierThreshold, RelativeHumidityHumidifierThreshold, ServiceLabelIndex, ServiceLabelNamespace, ColorTemperature, ProgramMode, InUse, SetDuration, RemainingDuration, ValveType, IsConfigured, SupportedVideoStreamConfiguration, SupportedAudioStreamConfiguration, SupportedRtpConfiguration, SelectedRtpStreamConfiguration, SetupEndpoints, Volume, Mute, NightVision, OpticalZoom, DigitalZoom, ImageRotation, ImageMirroring, StreamingStatus, ThreadNodeCapabilities, ThreadStatus, Unknown(Uuid),
}
Expand description

HAP-defined CharacteristicType (generated). Unknown carries any non-HAP UUID.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

AdministratorOnlyAccess

HAP short type “1”.

§

AudioFeedback

HAP short type “5”.

§

Brightness

HAP short type “8”.

§

CoolingThresholdTemperature

HAP short type “D”.

§

CurrentDoorState

HAP short type “E”.

§

CurrentHeatingCoolingState

HAP short type “F”.

§

CurrentRelativeHumidity

HAP short type “10”.

§

CurrentTemperature

HAP short type “11”.

§

HeatingThresholdTemperature

HAP short type “12”.

§

Hue

HAP short type “13”.

§

Identify

HAP short type “14”.

§

LockControlPoint

HAP short type “19”.

§

LockManagementAutoSecurityTimeout

HAP short type “1A”.

§

LockLastKnownAction

HAP short type “1C”.

§

LockCurrentState

HAP short type “1D”.

§

LockTargetState

HAP short type “1E”.

§

Logs

HAP short type “1F”.

§

Manufacturer

HAP short type “20”.

§

Model

HAP short type “21”.

§

MotionDetected

HAP short type “22”.

§

Name

HAP short type “23”.

§

ObstructionDetected

HAP short type “24”.

§

On

HAP short type “25”.

§

OutletInUse

HAP short type “26”.

§

RotationDirection

HAP short type “28”.

§

RotationSpeed

HAP short type “29”.

§

Saturation

HAP short type “2F”.

§

SerialNumber

HAP short type “30”.

§

TargetDoorState

HAP short type “32”.

§

TargetHeatingCoolingState

HAP short type “33”.

§

TargetRelativeHumidity

HAP short type “34”.

§

TargetTemperature

HAP short type “35”.

§

TemperatureDisplayUnits

HAP short type “36”.

§

Version

HAP short type “37”.

§

PairSetup

HAP short type “4C”.

§

PairVerify

HAP short type “4E”.

§

PairingFeatures

HAP short type “4F”.

§

PairingPairings

HAP short type “50”.

§

FirmwareRevision

HAP short type “52”.

§

HardwareRevision

HAP short type “53”.

§

AirParticulateDensity

HAP short type “64”.

§

AirParticulateSize

HAP short type “65”.

§

SecuritySystemCurrentState

HAP short type “66”.

§

SecuritySystemTargetState

HAP short type “67”.

§

BatteryLevel

HAP short type “68”.

§

CarbonMonoxideDetected

HAP short type “69”.

§

ContactSensorState

HAP short type “6A”.

§

CurrentAmbientLightLevel

HAP short type “6B”.

§

CurrentHorizontalTiltAngle

HAP short type “6C”.

§

CurrentPosition

HAP short type “6D”.

§

CurrentVerticalTiltAngle

HAP short type “6E”.

§

HoldPosition

HAP short type “6F”.

§

LeakDetected

HAP short type “70”.

§

OccupancyDetected

HAP short type “71”.

§

PositionState

HAP short type “72”.

§

ProgrammableSwitchEvent

HAP short type “73”.

§

StatusActive

HAP short type “75”.

§

SmokeDetected

HAP short type “76”.

§

StatusFault

HAP short type “77”.

§

StatusJammed

HAP short type “78”.

§

StatusLowBattery

HAP short type “79”.

§

StatusTampered

HAP short type “7A”.

§

TargetHorizontalTiltAngle

HAP short type “7B”.

§

TargetPosition

HAP short type “7C”.

§

TargetVerticalTiltAngle

HAP short type “7D”.

§

SecuritySystemAlarmType

HAP short type “8E”.

§

ChargingState

HAP short type “8F”.

§

CarbonMonoxideLevel

HAP short type “90”.

§

CarbonMonoxidePeakLevel

HAP short type “91”.

§

CarbonDioxideDetected

HAP short type “92”.

§

CarbonDioxideLevel

HAP short type “93”.

§

CarbonDioxidePeakLevel

HAP short type “94”.

§

AirQuality

HAP short type “95”.

§

AccessoryFlags

HAP short type “A6”.

§

LockPhysicalControls

HAP short type “A7”.

§

TargetAirPurifierState

HAP short type “A8”.

§

CurrentAirPurifierState

HAP short type “A9”.

§

CurrentSlatState

HAP short type “AA”.

§

FilterLifeLevel

HAP short type “AB”.

§

FilterChangeIndication

HAP short type “AC”.

§

ResetFilterIndication

HAP short type “AD”.

§

TargetAirQuality

HAP short type “AE”.

§

CurrentFanState

HAP short type “AF”.

§

Active

HAP short type “B0”.

§

CurrentHeaterCoolerState

HAP short type “B1”.

§

TargetHeaterCoolerState

HAP short type “B2”.

§

CurrentHumidifierDehumidifierState

HAP short type “B3”.

§

TargetHumidifierDehumidifierState

HAP short type “B4”.

§

WaterLevel

HAP short type “B5”.

§

SwingMode

HAP short type “B6”.

§

TargetSlatState

HAP short type “BE”.

§

TargetFanState

HAP short type “BF”.

§

SlatType

HAP short type “C0”.

§

CurrentTiltAngle

HAP short type “C1”.

§

TargetTiltAngle

HAP short type “C2”.

§

OzoneDensity

HAP short type “C3”.

§

NitrogenDioxideDensity

HAP short type “C4”.

§

SulphurDioxideDensity

HAP short type “C5”.

§

Pm25Density

HAP short type “C6”.

§

Pm10Density

HAP short type “C7”.

§

VocDensity

HAP short type “C8”.

§

RelativeHumidityDehumidifierThreshold

HAP short type “C9”.

§

RelativeHumidityHumidifierThreshold

HAP short type “CA”.

§

ServiceLabelIndex

HAP short type “CB”.

§

ServiceLabelNamespace

HAP short type “CD”.

§

ColorTemperature

HAP short type “CE”.

§

ProgramMode

HAP short type “D1”.

§

InUse

HAP short type “D2”.

§

SetDuration

HAP short type “D3”.

§

RemainingDuration

HAP short type “D4”.

§

ValveType

HAP short type “D5”.

§

IsConfigured

HAP short type “D6”.

§

SupportedVideoStreamConfiguration

HAP short type “114”.

§

SupportedAudioStreamConfiguration

HAP short type “115”.

§

SupportedRtpConfiguration

HAP short type “116”.

§

SelectedRtpStreamConfiguration

HAP short type “117”.

§

SetupEndpoints

HAP short type “118”.

§

Volume

HAP short type “119”.

§

Mute

HAP short type “11A”.

§

NightVision

HAP short type “11B”.

§

OpticalZoom

HAP short type “11C”.

§

DigitalZoom

HAP short type “11D”.

§

ImageRotation

HAP short type “11E”.

§

ImageMirroring

HAP short type “11F”.

§

StreamingStatus

HAP short type “120”.

§

ThreadNodeCapabilities

HAP short type “702”.

§

ThreadStatus

HAP short type “703”.

§

Unknown(Uuid)

A type not in the generated table.

Implementations§

Source§

impl CharacteristicType

Source

pub fn from_uuid(u: &Uuid) -> Self

Map a parsed Uuid to its named variant, or Unknown.

Source

pub fn uuid(&self) -> Uuid

The canonical Uuid for this type.

Source

pub fn default_format(&self) -> Option<CharFormat>

The HAP default value format for this characteristic, if known.

Source

pub fn unit(&self) -> Option<Unit>

The HAP unit for this characteristic, if it has one.

Source

pub fn valid_values(&self) -> Option<&'static [(i64, &'static str)]>

Named enum values for an enumerated characteristic, smallest-first.

Trait Implementations§

Source§

impl Clone for CharacteristicType

Source§

fn clone(&self) -> CharacteristicType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CharacteristicType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for CharacteristicType

Source§

impl Hash for CharacteristicType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for CharacteristicType

Source§

fn eq(&self, other: &CharacteristicType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for CharacteristicType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.