Command

Trait Command 

Source
pub trait Command {
    type In: Pod + MaybeBitdumpFormattable;
    type Out: Pod + Zeroable + MaybeBitdumpFormattable;
    type ExecutorError: Debug;
    type SpiExecutor: ExecutorSync<Command = Self, Error = Self::ExecutorError> + ExecutorAsync<Command = Self, Error = Self::ExecutorError>;
    type I2cExecutor: ExecutorSync<Command = Self, Error = Self::ExecutorError> + ExecutorAsync<Command = Self, Error = Self::ExecutorError>;
}
Expand description

The basis trait for all commands. A command represents one or more transactions that belong together and have to occur in a specific order and/or with a specific timing.

Commands can both have input and output data.

Required Associated Types§

Source

type In: Pod + MaybeBitdumpFormattable

The input data type

Source

type Out: Pod + Zeroable + MaybeBitdumpFormattable

The output data type

Source

type ExecutorError: Debug

A common error type which can represent all associated executor errors

Source

type SpiExecutor: ExecutorSync<Command = Self, Error = Self::ExecutorError> + ExecutorAsync<Command = Self, Error = Self::ExecutorError>

Source

type I2cExecutor: ExecutorSync<Command = Self, Error = Self::ExecutorError> + ExecutorAsync<Command = Self, Error = Self::ExecutorError>

Implementors§