Skip to main content

DeviceServerHandler

Trait DeviceServerHandler 

Source
pub trait DeviceServerHandler<___T: Transport = DriverChannel> {
    // Required methods
    fn get_resolution(
        &mut self,
        responder: Responder<GetResolution, ___T>,
    ) -> impl Future<Output = ()> + Send;
    fn get_sample(
        &mut self,
        request: Request<GetSample, ___T>,
        responder: Responder<GetSample, ___T>,
    ) -> impl Future<Output = ()> + Send;
}
Expand description

A server handler for the Device protocol.

See Device for more details.

Required Methods§

Source

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

Get adc resolution in number of bits.

Source

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

Get sample - raw count from adc - of the ADC channel indicated by channel_id.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§