Skip to main content

DeviceLocalServerHandler

Trait DeviceLocalServerHandler 

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

    // Provided method
    fn on_unknown_interaction(
        &mut self,
        ordinal: u64,
    ) -> impl Future<Output = ()> { ... }
}
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 = ()>

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

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

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(&mut self, responder: Responder<Get, ___T>)

Source§

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

Source§

async fn on_unknown_interaction(&mut self, ordinal: u64)

Implementors§