Struct fidl_fuchsia_settings::InputProxy
source · pub struct InputProxy { /* private fields */ }
Implementations§
source§impl InputProxy
impl InputProxy
sourcepub fn take_event_stream(&self) -> InputEventStream
pub fn take_event_stream(&self) -> InputEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn watch(
&self,
) -> QueryResponseFut<InputSettings, DefaultFuchsiaResourceDialect>
pub fn watch( &self, ) -> QueryResponseFut<InputSettings, DefaultFuchsiaResourceDialect>
Gets the current |InputSettings|. Returns immediately on first call; subsequent calls return when the value changes.
When any of the input devices’ states change, this will return the full InputSettings object, containing the states for all the available input devices on the target device.
To find the state of a specific input device, the devices vector contained in settings can be iterated through to find a specific DeviceType. If there are multiple devices of the same DeviceType, the InputDevice’s device_name can be examined in conjunction with the DeviceType to find the desired input device. Together, the device_name and DeviceType uniquely identify an InputDevice.
If this call fails, it is considered a fatal error and the channel will be closed.
sourcepub fn set(
&self,
input_states: &[InputState],
) -> QueryResponseFut<InputSetResult, DefaultFuchsiaResourceDialect>
pub fn set( &self, input_states: &[InputState], ) -> QueryResponseFut<InputSetResult, DefaultFuchsiaResourceDialect>
Requests software input devices to set their software state. May not necessarily change the overall state of the device, depending on the hardware state. Will modify the software state of the existing device if a known device_name and device_type are passed. Otherwise it will add a new input device. Devices not included in input_states will not be modified.
Trait Implementations§
source§impl Clone for InputProxy
impl Clone for InputProxy
source§fn clone(&self) -> InputProxy
fn clone(&self) -> InputProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InputProxy
impl Debug for InputProxy
source§impl InputProxyInterface for InputProxy
impl InputProxyInterface for InputProxy
type WatchResponseFut = QueryResponseFut<InputSettings>
fn watch(&self) -> Self::WatchResponseFut
type SetResponseFut = QueryResponseFut<Result<(), Error>>
fn set(&self, input_states: &[InputState]) -> Self::SetResponseFut
source§impl Proxy for InputProxy
impl Proxy for InputProxy
§type Protocol = InputMarker
type Protocol = InputMarker
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for InputProxy
impl !RefUnwindSafe for InputProxy
impl Send for InputProxy
impl Sync for InputProxy
impl Unpin for InputProxy
impl !UnwindSafe for InputProxy
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)