Trait CommandHandler
Source pub trait CommandHandler {
// Required methods
fn handle_read_byte(&self) -> Option<u8>;
fn handle_read_byte_data(&self, reg: u8) -> Option<u8>;
fn handle_read_word_data(&self, reg: u8) -> Option<u16>;
fn handle_read_block_data(&self, reg: u8, index: u8) -> Option<u8>;
fn handle_write_byte(&mut self, data: u8) -> Result<(), ()>;
fn handle_write_byte_data(&mut self, reg: u8, data: u8) -> Result<(), ()>;
fn handle_write_word_data(&mut self, reg: u8, data: u16) -> Result<(), ()>;
fn handle_write_block_data(
&mut self,
reg: u8,
count: u8,
block: &[u8],
) -> Result<(), ()>;
// Provided method
fn handle_i2c_event(
&mut self,
event: &mut I2CEvent<'_>,
bus_state: &mut SMBusState,
) -> Result<(), SMBusProtocolError> { ... }
}