Skip to main content

DeviceServerHandler

Trait DeviceServerHandler 

Source
pub trait DeviceServerHandler<___T: Transport = Channel> {
    // Required methods
    fn get(
        &mut self,
        responder: Responder<Get, ___T>,
    ) -> impl Future<Output = ()> + Send;
    fn set2(
        &mut self,
        request: Request<Set2, ___T>,
        responder: Responder<Set2, ___T>,
    ) -> impl Future<Output = ()> + Send;

    // Provided method
    fn on_unknown_interaction(
        &mut self,
        ordinal: u64,
    ) -> impl Future<Output = ()> + Send { ... }
}
Expand description

A server handler for the Device protocol.

See Device for more details.

Required Methods§

Source

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

Get the current RTC time. If the driver detects that it does not have a valid time to report, then it will return an ZX_ERR_INTERNAL error.

Source

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

Set the RTC time. If the RTC time is not valid, the driver will return an ZX_ERR_OUT_OF_RANGE error.

Provided Methods§

Source

fn on_unknown_interaction( &mut self, ordinal: u64, ) -> impl Future<Output = ()> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§