Skip to main content

DefinitionLoader

Trait DefinitionLoader 

Source
pub trait DefinitionLoader {
    // Required method
    fn load(&self) -> Result<Vec<GenericDefinition>>;

    // Provided method
    fn claim(&mut self, _path: &Path) -> bool { ... }
}
Expand description

Reads configuration from a source and produces generic definitions.

Required Methods§

Source

fn load(&self) -> Result<Vec<GenericDefinition>>

Load definitions from all claimed paths and/or internal sources.

Provided Methods§

Source

fn claim(&mut self, _path: &Path) -> bool

Claim a path and store it if this loader should handle it. Default returns false for self-contained loaders.

Implementors§