Skip to main content

DeviceLocalServerHandler

Trait DeviceLocalServerHandler 

Source
pub trait DeviceLocalServerHandler<___T: Transport = Channel> {
    // Required methods
    fn get_class(
        &mut self,
        responder: Responder<GetClass, ___T>,
    ) -> impl Future<Output = ()>;
    fn set_config(
        &mut self,
        request: Request<SetConfig, ___T>,
        responder: Responder<SetConfig, ___T>,
    ) -> impl Future<Output = ()>;
    fn read(
        &mut self,
        responder: Responder<Read, ___T>,
    ) -> impl Future<Output = ()>;
    fn write(
        &mut self,
        request: Request<Write, ___T>,
        responder: Responder<Write, ___T>,
    ) -> impl Future<Output = ()>;
}
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 = ()>

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 = ()>

Set the configuration of this serial device.

Source

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

Reads data from the serial port.

Source

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

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

Implementations on Foreign Types§

Source§

impl<___H, ___T> DeviceLocalServerHandler<___T> for Local<___H>
where ___H: DeviceServerHandler<___T>, ___T: Transport,

Source§

async fn get_class(&mut self, responder: Responder<GetClass, ___T>)

Source§

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

Source§

async fn read(&mut self, responder: Responder<Read, ___T>)

Source§

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

Implementors§