pub trait RamCommand {
// Required methods
fn command(&mut self, cmd: Command) -> Result<Response>;
fn send_data(&mut self, data: &[u8]) -> Result<Response>;
// Provided methods
fn supports_debug_sequence_replacement(&mut self) -> Result<bool> { ... }
fn send_debug_sequence_replacement_info(
&mut self,
_info: &DebugSequenceReplacementInfo,
) -> Result<Response> { ... }
fn format_command(&self, cmd: &Command) -> String { ... }
}Expand description
RAM命令处理trait,定义了发送命令和数据的接口
Required Methods§
fn command(&mut self, cmd: Command) -> Result<Response>
fn send_data(&mut self, data: &[u8]) -> Result<Response>
Provided Methods§
Sourcefn supports_debug_sequence_replacement(&mut self) -> Result<bool>
fn supports_debug_sequence_replacement(&mut self) -> Result<bool>
Whether the connected RAM patch supports burn_info. The default keeps
legacy and non-Debug-IP chips on their existing raw write path.
fn send_debug_sequence_replacement_info( &mut self, _info: &DebugSequenceReplacementInfo, ) -> Result<Response>
fn format_command(&self, cmd: &Command) -> String
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".