pub trait Interface {
type Word: Copy;
type Error: Debug;
const KIND: InterfaceKind;
// Required methods
fn send_command(
&mut self,
command: u8,
args: &[u8],
) -> impl Future<Output = Result<(), Self::Error>>;
fn send_data_slice(
&mut self,
data: &[Self::Word],
) -> impl Future<Output = Result<(), Self::Error>>;
}
Expand description
Command and pixel interface
Required Associated Constants§
Sourceconst KIND: InterfaceKind
const KIND: InterfaceKind
Kind
Required Associated Types§
Required Methods§
Sourcefn send_command(
&mut self,
command: u8,
args: &[u8],
) -> impl Future<Output = Result<(), Self::Error>>
fn send_command( &mut self, command: u8, args: &[u8], ) -> impl Future<Output = Result<(), Self::Error>>
Send a command with optional parameters
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.