pub struct SourceSynchronousProxy { /* private fields */ }
Implementations§
source§impl SourceSynchronousProxy
impl SourceSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<SourceEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<SourceEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn get_power_info(
&self,
___deadline: Time
) -> Result<(i32, SourceInfo), Error>
pub fn get_power_info( &self, ___deadline: Time ) -> Result<(i32, SourceInfo), Error>
Get device info.
sourcepub fn get_state_change_event(
&self,
___deadline: Time
) -> Result<(i32, Event), Error>
pub fn get_state_change_event( &self, ___deadline: Time ) -> Result<(i32, Event), Error>
Get an event to receive state change notifications on. ZX_USER_SIGNAL_0 is
asserted when power_info_t.state is changed. It is deasserted when the
state is read via GetPowerInfo
.
sourcepub fn get_battery_info(
&self,
___deadline: Time
) -> Result<(i32, BatteryInfo), Error>
pub fn get_battery_info( &self, ___deadline: Time ) -> Result<(i32, BatteryInfo), Error>
Get battery info. Only supported if type == PowerType::BATTERY.