Skip to main content

FormatPlugin

Trait FormatPlugin 

Source
pub trait FormatPlugin: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn probe(&self, header: &[u8]) -> u8;
    fn open(&self, path: &Path) -> Result<Box<dyn PhysicalMemoryProvider>>;
}
Expand description

A plugin that can detect and open a specific dump format.

Required Methods§

Source

fn name(&self) -> &str

Human-readable name for this format.

Source

fn probe(&self, header: &[u8]) -> u8

Probe the first header bytes of a file. Return confidence 0-100.

Source

fn open(&self, path: &Path) -> Result<Box<dyn PhysicalMemoryProvider>>

Open the file and return a PhysicalMemoryProvider.

Trait Implementations§

Source§

impl Collect for &'static dyn FormatPlugin

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§