pub trait DisplayInterface {
// Required methods
fn send_command(&mut self, command: u8) -> Result<(), DisplayError>;
fn send_data(&mut self, data: &[u8]) -> Result<(), DisplayError>;
fn send_data_from_iter<'a, I>(
&mut self,
iter: I,
) -> Result<(), DisplayError>
where I: IntoIterator<Item = &'a u8>;
fn busy_wait(&self);
fn reset<D>(&mut self, delay: &mut D, initial_delay: u32, duration: u32)
where D: DelayUs<u32>;
// Provided method
fn send_command_data(
&mut self,
command: u8,
data: &[u8],
) -> Result<(), DisplayError> { ... }
}
Expand description
Trait implemented by displays to provide implemenation of core functionality.
Required Methods§
Sourcefn send_command(&mut self, command: u8) -> Result<(), DisplayError>
fn send_command(&mut self, command: u8) -> Result<(), DisplayError>
Send a command to the controller.
Sourcefn send_data_from_iter<'a, I>(&mut self, iter: I) -> Result<(), DisplayError>where
I: IntoIterator<Item = &'a u8>,
fn send_data_from_iter<'a, I>(&mut self, iter: I) -> Result<(), DisplayError>where
I: IntoIterator<Item = &'a u8>,
Send data via iter
Provided Methods§
fn send_command_data( &mut self, command: u8, data: &[u8], ) -> Result<(), DisplayError>
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.