Skip to main content

TestServerHandler

Trait TestServerHandler 

Source
pub trait TestServerHandler<___T: Transport = Channel> {
    // Required method
    fn connect_spi_loopback(
        &mut self,
        request: Request<ConnectSpiLoopback, ___T>,
        responder: Responder<ConnectSpiLoopback, ___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 Test protocol.

See Test for more details.

Required Methods§

Source

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

Opens a connection to a SPI device in loopback mode, to be used for testing.

Returns ZX_ERR_NOT_SUPPORTED if debugging is not enabled in this build.

If the SPI implementation driver itself does not support loopback mode, this call will succeed, but calls to the Device will fail with ZX_ERR_NOT_SUPPORTED instead.

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§