DecoderPlugin

Trait DecoderPlugin 

Source
pub trait DecoderPlugin: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn name(&self) -> &str;
    fn meta(&self) -> &PluginMeta;
    fn parse(&self, input: &str) -> Vec<Interpretation>;

    // Provided method
    fn aliases(&self) -> &[String] { ... }
}
Expand description

Trait for decoder plugins that parse custom input formats.

Required Methods§

Source

fn id(&self) -> &str

Unique identifier for this decoder (e.g., “myformat”).

Source

fn name(&self) -> &str

Human-readable name (e.g., “My Custom Format”).

Source

fn meta(&self) -> &PluginMeta

Plugin metadata.

Source

fn parse(&self, input: &str) -> Vec<Interpretation>

Parse input and return interpretations.

Returns an empty Vec if input doesn’t match this format.

Provided Methods§

Source

fn aliases(&self) -> &[String]

Aliases for this decoder (alternative names).

Implementors§