Skip to main content

DeviceProxyInterface

Trait DeviceProxyInterface 

Source
pub trait DeviceProxyInterface: Send + Sync {
    type GetRailMetadataResponseFut: Future<Output = Result<DeviceGetRailMetadataResult, Error>> + Send;
    type GetPowerWattsResponseFut: Future<Output = Result<DeviceGetPowerWattsResult, Error>> + Send;
    type GetCurrentAmperesResponseFut: Future<Output = Result<DeviceGetCurrentAmperesResult, Error>> + Send;
    type GetEnergyJoulesResponseFut: Future<Output = Result<DeviceGetEnergyJoulesResult, Error>> + Send;

    // Required methods
    fn get_rail_metadata(&self) -> Self::GetRailMetadataResponseFut;
    fn get_power_watts(
        &self,
        payload: &Options,
    ) -> Self::GetPowerWattsResponseFut;
    fn get_current_amperes(
        &self,
        payload: &Options,
    ) -> Self::GetCurrentAmperesResponseFut;
    fn get_energy_joules(
        &self,
        payload: &Options,
    ) -> Self::GetEnergyJoulesResponseFut;
}

Required Associated Types§

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§