CommandInterfaceAsync

Trait CommandInterfaceAsync 

Source
pub trait CommandInterfaceAsync {
    type BusError: Debug;

    // Required method
    async fn execute<C, D>(
        &mut self,
        delay: &mut D,
        input: C::In,
    ) -> Result<C::Out, TransportError<C::ExecutorError, Self::BusError>>
       where D: DelayNs,
             C: Command;
}
Expand description

A trait that is implemented by any bus interface and allows devices with commands to share commands executor implementations independent of the actual interface in use.

Required Associated Types§

Source

type BusError: Debug

A type representing errors on the underlying bus

Required Methods§

Source

async fn execute<C, D>( &mut self, delay: &mut D, input: C::In, ) -> Result<C::Out, TransportError<C::ExecutorError, Self::BusError>>
where D: DelayNs, C: Command,

Executes the given command through this interface

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§