pub trait RamCommand {
// Required methods
fn command(&mut self, cmd: Command) -> Result<Response>;
fn send_data(&mut self, data: &[u8]) -> Result<Response>;
// Provided method
fn format_command(&self, cmd: &Command) -> String { ... }
}Expand description
RAM命令处理trait,定义了发送命令和数据的接口