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§
Sourcefn meta(&self) -> &PluginMeta
fn meta(&self) -> &PluginMeta
Plugin metadata.
Sourcefn parse(&self, input: &str) -> Vec<Interpretation>
fn parse(&self, input: &str) -> Vec<Interpretation>
Parse input and return interpretations.
Returns an empty Vec if input doesn’t match this format.