Skip to main content

ImportPlugin

Trait ImportPlugin 

Source
pub trait ImportPlugin {
    // Required methods
    fn import(&self, path: &Path) -> Result<Vec<Entry>>;
    fn name(&self) -> &str;
    fn settings(&self) -> ImportPluginSettings;
}
Expand description

The interface that import format plugins must implement.

Each plugin provides a trigger pattern used to match --type FORMAT values and an import method that reads entries from a file path.

Required Methods§

Source

fn import(&self, path: &Path) -> Result<Vec<Entry>>

Import entries from the file at path.

Source

fn name(&self) -> &str

Return the canonical name of this import format.

Source

fn settings(&self) -> ImportPluginSettings

Return the plugin’s settings including trigger pattern.

Implementors§