pub enum DiscoveryResult {
GenericDevice {
device_info: Box<DeviceInfoGenericResult>,
handler: GenericDeviceHandler,
},
Light {
device_info: Box<DeviceInfoLightResult>,
handler: LightHandler,
},
ColorLight {
device_info: Box<DeviceInfoColorLightResult>,
handler: ColorLightHandler,
},
RgbLightStrip {
device_info: Box<DeviceInfoRgbLightStripResult>,
handler: RgbLightStripHandler,
},
RgbicLightStrip {
device_info: Box<DeviceInfoRgbicLightStripResult>,
handler: RgbicLightStripHandler,
},
Plug {
device_info: Box<DeviceInfoPlugResult>,
handler: PlugHandler,
},
PlugEnergyMonitoring {
device_info: Box<DeviceInfoPlugEnergyMonitoringResult>,
handler: PlugEnergyMonitoringHandler,
},
PowerStrip {
device_info: Box<DeviceInfoPowerStripResult>,
handler: PowerStripHandler,
},
PowerStripEnergyMonitoring {
device_info: Box<DeviceInfoPowerStripResult>,
handler: PowerStripEnergyMonitoringHandler,
},
Hub {
device_info: Box<DeviceInfoHubResult>,
handler: HubHandler,
},
}Expand description
Result of the device discovery process.
Variants§
GenericDevice
A Generic Tapo device.
If you believe this device is already supported, or would like to explore adding support for a currently unsupported model, please open an issue on GitHub to start the discussion.
Fields
device_info: Box<DeviceInfoGenericResult>Device info of a Generic Tapo device.
If you believe this device is already supported, or would like to explore adding support for a currently unsupported model, please open an issue on GitHub to start the discussion.
handler: GenericDeviceHandlerHandler for generic devices. It provides the functionality common to all Tapo devices.
If you believe this device is already supported, or would like to explore adding support for a currently unsupported model, please open an issue on GitHub to start the discussion.
Light
Tapo L510, L520 and L610 devices.
Fields
device_info: Box<DeviceInfoLightResult>Device info of Tapo L510, L520 and L610.
handler: LightHandlerColorLight
Tapo L530, L535 and L630 devices.
Fields
device_info: Box<DeviceInfoColorLightResult>Device info of Tapo L530, L535 and L630.
handler: ColorLightHandlerRgbLightStrip
Tapo L900 devices.
Fields
device_info: Box<DeviceInfoRgbLightStripResult>Device info of Tapo L900.
handler: RgbLightStripHandlerHandler for the L900 devices.
RgbicLightStrip
Tapo L920 and L930 devices.
Fields
device_info: Box<DeviceInfoRgbicLightStripResult>Device info of Tapo L920 and L930.
handler: RgbicLightStripHandlerPlug
Tapo P100 and P105 devices.
Fields
device_info: Box<DeviceInfoPlugResult>Device info of Tapo P100 and P105.
handler: PlugHandlerPlugEnergyMonitoring
Tapo P110, P110M and P115 devices.
Fields
device_info: Box<DeviceInfoPlugEnergyMonitoringResult>Device info of Tapo P110, P110M and P115.
handler: PlugEnergyMonitoringHandlerPowerStrip
Tapo P300 and P306 devices.
Fields
device_info: Box<DeviceInfoPowerStripResult>Device info of Tapo P300 and P306.
handler: PowerStripHandlerPowerStripEnergyMonitoring
Tapo P304M and P316M devices.
Fields
device_info: Box<DeviceInfoPowerStripResult>Device info of Tapo P304M and P316M.
handler: PowerStripEnergyMonitoringHandlerHub
Tapo H100 devices.
Fields
device_info: Box<DeviceInfoHubResult>Device info of Tapo H100.
handler: HubHandlerHandler for the H100 devices.
Implementations§
Source§impl DiscoveryResult
impl DiscoveryResult
Sourcepub fn device_type(&self) -> DeviceType
pub fn device_type(&self) -> DeviceType
Returns the DeviceType category of this discovery result.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DiscoveryResult
impl !RefUnwindSafe for DiscoveryResult
impl Send for DiscoveryResult
impl Sync for DiscoveryResult
impl Unpin for DiscoveryResult
impl UnsafeUnpin for DiscoveryResult
impl !UnwindSafe for DiscoveryResult
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more