pub trait KeyboardLocalServerHandler<___T: Transport = Channel> {
// Required method
fn add_listener(
&mut self,
request: Request<AddListener, ___T>,
responder: Responder<AddListener, ___T>,
) -> impl Future<Output = ()>;
}Expand description
A server handler for the Keyboard protocol.
See Keyboard for more details.
Required Methods§
Sourcefn add_listener(
&mut self,
request: Request<AddListener, ___T>,
responder: Responder<AddListener, ___T>,
) -> impl Future<Output = ()>
fn add_listener( &mut self, request: Request<AddListener, ___T>, responder: Responder<AddListener, ___T>, ) -> impl Future<Output = ()>
Add a key event listener for the specified View.
If multiple listeners are added, each will receive key events independently and
should respond with a Status.
The client calling AddListener should keep the connection to Keyboard alive
for as long as the events from KeyboardListener need to be received. Dropping the
connection to the Keyboard protocol will terminate KeyboardListener as well.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".