pub struct PowerStripPlugEnergyMonitoringHandler { /* private fields */ }Implementations§
Source§impl PowerStripPlugEnergyMonitoringHandler
impl PowerStripPlugEnergyMonitoringHandler
Sourcepub async fn get_device_info(
&self,
) -> Result<PowerStripPlugEnergyMonitoringResult, Error>
pub async fn get_device_info( &self, ) -> Result<PowerStripPlugEnergyMonitoringResult, Error>
Returns device info as PowerStripPlugEnergyMonitoringResult.
It is not guaranteed to contain all the properties returned from the Tapo API.
If the deserialization fails, or if a property that you care about it’s not present, try [PowerStripPlugEnergyMonitoringHandler::get_device_info_json].
Source§impl PowerStripPlugEnergyMonitoringHandler
impl PowerStripPlugEnergyMonitoringHandler
Sourcepub async fn get_current_power(&self) -> Result<CurrentPowerResult, Error>
pub async fn get_current_power(&self) -> Result<CurrentPowerResult, Error>
Returns current power as CurrentPowerResult.
Sourcepub async fn get_device_usage(
&self,
) -> Result<DeviceUsageEnergyMonitoringResult, Error>
pub async fn get_device_usage( &self, ) -> Result<DeviceUsageEnergyMonitoringResult, Error>
Returns device usage as DeviceUsageEnergyMonitoringResult.
Sourcepub async fn get_energy_usage(&self) -> Result<EnergyUsageResult, Error>
pub async fn get_energy_usage(&self) -> Result<EnergyUsageResult, Error>
Returns energy usage as EnergyUsageResult.
Sourcepub async fn get_energy_data(
&self,
interval: EnergyDataInterval,
) -> Result<EnergyDataResult, Error>
pub async fn get_energy_data( &self, interval: EnergyDataInterval, ) -> Result<EnergyDataResult, Error>
Returns energy data as EnergyDataResult.
Sourcepub async fn get_power_data(
&self,
interval: PowerDataInterval,
) -> Result<PowerDataResult, Error>
pub async fn get_power_data( &self, interval: PowerDataInterval, ) -> Result<PowerDataResult, Error>
Returns power data as PowerDataResult.
Auto Trait Implementations§
impl Freeze for PowerStripPlugEnergyMonitoringHandler
impl !RefUnwindSafe for PowerStripPlugEnergyMonitoringHandler
impl Send for PowerStripPlugEnergyMonitoringHandler
impl Sync for PowerStripPlugEnergyMonitoringHandler
impl Unpin for PowerStripPlugEnergyMonitoringHandler
impl UnsafeUnpin for PowerStripPlugEnergyMonitoringHandler
impl !UnwindSafe for PowerStripPlugEnergyMonitoringHandler
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
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>
Converts
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>
Converts
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