pub struct KeyboardListenerProxy { /* private fields */ }
Implementations§
source§impl KeyboardListenerProxy
impl KeyboardListenerProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.ui.input3/KeyboardListener.
sourcepub fn take_event_stream(&self) -> KeyboardListenerEventStream
pub fn take_event_stream(&self) -> KeyboardListenerEventStream
Get a Stream of events from the remote end of the protocol.
Panics
Panics if the event stream was already taken.
sourcepub fn on_key_event(&self, event: &KeyEvent) -> QueryResponseFut<KeyEventStatus>
pub fn on_key_event(&self, event: &KeyEvent) -> QueryResponseFut<KeyEventStatus>
Called when a key event takes place, such as key press or release.
Protocol implementers must respond to acknowledge the event by returning Status in a timely manner, i.e. not introducing significant delays to the input pipeline (typically 10s of milliseconds).
Returning NOT_HANDLED
means the event may be offered to other
clients of other related APIs.
Clients that do not acknowledge their events will eventually be disconnected.
Notification is only dispatched to a view that has focus. No other views,
including parents or children, will get notified specifically via OnKeyEvent
.
Trait Implementations§
source§impl Clone for KeyboardListenerProxy
impl Clone for KeyboardListenerProxy
source§fn clone(&self) -> KeyboardListenerProxy
fn clone(&self) -> KeyboardListenerProxy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for KeyboardListenerProxy
impl Debug for KeyboardListenerProxy
source§impl KeyboardListenerProxyInterface for KeyboardListenerProxy
impl KeyboardListenerProxyInterface for KeyboardListenerProxy
type OnKeyEventResponseFut = QueryResponseFut<KeyEventStatus>
fn on_key_event(&self, event: &KeyEvent) -> Self::OnKeyEventResponseFut
source§impl Proxy for KeyboardListenerProxy
impl Proxy for KeyboardListenerProxy
§type Protocol = KeyboardListenerMarker
type Protocol = KeyboardListenerMarker
The protocol which this
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Attempt to convert the proxy back into a client end. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for KeyboardListenerProxy
impl Send for KeyboardListenerProxy
impl Sync for KeyboardListenerProxy
impl Unpin for KeyboardListenerProxy
impl !UnwindSafe for KeyboardListenerProxy
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
Mutably borrows from an owned value. Read more