Skip to main content

Source

Trait Source 

Source
pub trait Source: Send + Sync {
    // Required methods
    fn read(&self, path: &str) -> Option<String>;
    fn paths(&self) -> Vec<String>;
}
Expand description

Where config files come from. Paths are relative to the library root (the package’s config/devices), with / separators.

Required Methods§

Source

fn read(&self, path: &str) -> Option<String>

The text of a file, if it exists.

Source

fn paths(&self) -> Vec<String>

Every .json file’s path.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§