Skip to main content

DeviceProxyInterface

Trait DeviceProxyInterface 

Source
pub trait DeviceProxyInterface: Send + Sync {
    type GetFanLevelResponseFut: Future<Output = Result<(i32, u32), Error>> + Send;
    type SetFanLevelResponseFut: Future<Output = Result<i32, Error>> + Send;
    type GetTemperatureCelsiusResponseFut: Future<Output = Result<(i32, f32), Error>> + Send;
    type GetSensorNameResponseFut: Future<Output = Result<String, Error>> + Send;
    type GetInfoResponseFut: Future<Output = Result<(i32, Option<Box<ThermalInfo>>), Error>> + Send;
    type GetDeviceInfoResponseFut: Future<Output = Result<(i32, Option<Box<ThermalDeviceInfo>>), Error>> + Send;
    type GetDvfsInfoResponseFut: Future<Output = Result<(i32, Option<Box<OperatingPoint>>), Error>> + Send;
    type GetStateChangeEventResponseFut: Future<Output = Result<(i32, Option<Event>), Error>> + Send;
    type GetStateChangePortResponseFut: Future<Output = Result<(i32, Option<Port>), Error>> + Send;
    type SetTripCelsiusResponseFut: Future<Output = Result<i32, Error>> + Send;
    type GetDvfsOperatingPointResponseFut: Future<Output = Result<(i32, u16), Error>> + Send;
    type SetDvfsOperatingPointResponseFut: Future<Output = Result<i32, Error>> + Send;

    // Required methods
    fn get_fan_level(&self) -> Self::GetFanLevelResponseFut;
    fn set_fan_level(&self, fan_level: u32) -> Self::SetFanLevelResponseFut;
    fn get_temperature_celsius(&self) -> Self::GetTemperatureCelsiusResponseFut;
    fn get_sensor_name(&self) -> Self::GetSensorNameResponseFut;
    fn get_info(&self) -> Self::GetInfoResponseFut;
    fn get_device_info(&self) -> Self::GetDeviceInfoResponseFut;
    fn get_dvfs_info(
        &self,
        power_domain: PowerDomain,
    ) -> Self::GetDvfsInfoResponseFut;
    fn get_state_change_event(&self) -> Self::GetStateChangeEventResponseFut;
    fn get_state_change_port(&self) -> Self::GetStateChangePortResponseFut;
    fn set_trip_celsius(
        &self,
        id: u32,
        temp: f32,
    ) -> Self::SetTripCelsiusResponseFut;
    fn get_dvfs_operating_point(
        &self,
        power_domain: PowerDomain,
    ) -> Self::GetDvfsOperatingPointResponseFut;
    fn set_dvfs_operating_point(
        &self,
        op_idx: u16,
        power_domain: PowerDomain,
    ) -> Self::SetDvfsOperatingPointResponseFut;
}

Required Associated Types§

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§