pub struct DeviceSynchronousProxy { /* private fields */ }
Implementations§
Source§impl DeviceSynchronousProxy
impl DeviceSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<DeviceEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<DeviceEvent, 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_state_normalized(
&self,
___deadline: MonotonicInstant,
) -> Result<DeviceGetStateNormalizedResult, Error>
pub fn get_state_normalized( &self, ___deadline: MonotonicInstant, ) -> Result<DeviceGetStateNormalizedResult, Error>
Gets the current backlight brightness as a percentage value between 0.0 and 1.0
Sourcepub fn set_state_normalized(
&self,
state: &State,
___deadline: MonotonicInstant,
) -> Result<DeviceSetStateNormalizedResult, Error>
pub fn set_state_normalized( &self, state: &State, ___deadline: MonotonicInstant, ) -> Result<DeviceSetStateNormalizedResult, Error>
Sets the current backlight brightness as a percentage value between 0.0 and 1.0
Sourcepub fn get_state_absolute(
&self,
___deadline: MonotonicInstant,
) -> Result<DeviceGetStateAbsoluteResult, Error>
pub fn get_state_absolute( &self, ___deadline: MonotonicInstant, ) -> Result<DeviceGetStateAbsoluteResult, Error>
Gets the current backlight brightness in nits
Sourcepub fn set_state_absolute(
&self,
state: &State,
___deadline: MonotonicInstant,
) -> Result<DeviceSetStateAbsoluteResult, Error>
pub fn set_state_absolute( &self, state: &State, ___deadline: MonotonicInstant, ) -> Result<DeviceSetStateAbsoluteResult, Error>
Sets the current backlight brightness in nits. Not affected by the scale set by SetNormalizedBrightnessScale.
Sourcepub fn get_max_absolute_brightness(
&self,
___deadline: MonotonicInstant,
) -> Result<DeviceGetMaxAbsoluteBrightnessResult, Error>
pub fn get_max_absolute_brightness( &self, ___deadline: MonotonicInstant, ) -> Result<DeviceGetMaxAbsoluteBrightnessResult, Error>
Gets the maximum supported backlight brightness in nits, if known. Otherwise returns error ZX_ERR_NOT_SUPPORTED.
Sourcepub fn set_normalized_brightness_scale(
&self,
scale: f64,
___deadline: MonotonicInstant,
) -> Result<DeviceSetNormalizedBrightnessScaleResult, Error>
pub fn set_normalized_brightness_scale( &self, scale: f64, ___deadline: MonotonicInstant, ) -> Result<DeviceSetNormalizedBrightnessScaleResult, Error>
Scales the maximum normalized brightness by a percentage value in [0.0, 1.0], if supported. Otherwise returns error ZX_ERR_NOT_SUPPORTED. Values passed to SetStateNormalized will correspond to a maximum brightness of scale * GetMaxAbsoluteBrightness(). Calling this may change the current absolute brightness.
Sourcepub fn get_normalized_brightness_scale(
&self,
___deadline: MonotonicInstant,
) -> Result<DeviceGetNormalizedBrightnessScaleResult, Error>
pub fn get_normalized_brightness_scale( &self, ___deadline: MonotonicInstant, ) -> Result<DeviceGetNormalizedBrightnessScaleResult, Error>
Gets the current normalized brightness scale as a percentage value in [0.0, 1.0].
Trait Implementations§
Source§impl Debug for DeviceSynchronousProxy
impl Debug for DeviceSynchronousProxy
Source§impl SynchronousProxy for DeviceSynchronousProxy
impl SynchronousProxy for DeviceSynchronousProxy
Source§type Proxy = DeviceProxy
type Proxy = DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Proxy
controls.