Skip to main content

KeyboardLocalServerHandler

Trait KeyboardLocalServerHandler 

Source
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§

Source

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".

Implementations on Foreign Types§

Source§

impl<___H, ___T> KeyboardLocalServerHandler<___T> for Local<___H>
where ___H: KeyboardServerHandler<___T>, ___T: Transport,

Source§

async fn add_listener( &mut self, request: Request<AddListener, ___T>, responder: Responder<AddListener, ___T>, )

Implementors§