Skip to main content

TestLocalServerHandler

Trait TestLocalServerHandler 

Source
pub trait TestLocalServerHandler<___T: Transport = Channel> {
    // Required method
    fn connect_spi_loopback(
        &mut self,
        request: Request<ConnectSpiLoopback, ___T>,
        responder: Responder<ConnectSpiLoopback, ___T>,
    ) -> impl Future<Output = ()>;

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

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

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> TestLocalServerHandler<___T> for Local<___H>
where ___H: TestServerHandler<___T>, ___T: Transport,

Source§

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

Source§

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

Implementors§