Skip to main content

MemoryFormatter

Trait MemoryFormatter 

Source
pub trait MemoryFormatter: Send + Sync {
    // Required methods
    fn format(&self, dump: &MemoryDump) -> Result<Vec<u8>, String>;
    fn file_extension(&self) -> &'static str;

    // Provided method
    fn is_text(&self) -> bool { ... }
}
Expand description

Trait for memory dump formatters.

Implement this trait to add a new output format.

Required Methods§

Source

fn format(&self, dump: &MemoryDump) -> Result<Vec<u8>, String>

Format a memory dump into bytes ready to be written.

Source

fn file_extension(&self) -> &'static str

Get the file extension for this format (without leading dot).

Provided Methods§

Source

fn is_text(&self) -> bool

Whether this format is human-readable (affects stdout display).

Implementors§