Skip to main content

DeviceServerHandler

Trait DeviceServerHandler 

Source
pub trait DeviceServerHandler<___T: Transport = Channel> {
    // Required methods
    fn get_class(
        &mut self,
        responder: Responder<GetClass, ___T>,
    ) -> impl Future<Output = ()> + Send;
    fn set_config(
        &mut self,
        request: Request<SetConfig, ___T>,
        responder: Responder<SetConfig, ___T>,
    ) -> impl Future<Output = ()> + Send;
    fn read(
        &mut self,
        responder: Responder<Read, ___T>,
    ) -> impl Future<Output = ()> + Send;
    fn write(
        &mut self,
        request: Request<Write, ___T>,
        responder: Responder<Write, ___T>,
    ) -> impl Future<Output = ()> + Send;
}
Expand description

A server handler for the Device protocol.

See Device for more details.

Required Methods§

Source

fn get_class( &mut self, responder: Responder<GetClass, ___T>, ) -> impl Future<Output = ()> + Send

Lookup what type of serial device this is.

Source

fn set_config( &mut self, request: Request<SetConfig, ___T>, responder: Responder<SetConfig, ___T>, ) -> impl Future<Output = ()> + Send

Set the configuration of this serial device.

Source

fn read( &mut self, responder: Responder<Read, ___T>, ) -> impl Future<Output = ()> + Send

Reads data from the serial port.

Source

fn write( &mut self, request: Request<Write, ___T>, responder: Responder<Write, ___T>, ) -> impl Future<Output = ()> + Send

Writes data to the serial port.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§