pub trait Loader:
Send
+ Sync
+ Debug
+ Display {
// Required methods
fn scheme_list(&self) -> Vec<String>;
fn load(
&self,
url: &Url,
maybe_whitelist: Option<&[String]>,
skip_soft_errors: bool,
) -> Result<Vec<(String, ConfigurationEntity)>, Error>;
}Expand description
A trait to load configurations for one or more plugins.
Required Methods§
Sourcefn scheme_list(&self) -> Vec<String>
fn scheme_list(&self) -> Vec<String>
List of URL schemes that this loader supports.
Different URL may be assigned to this loader by their scheme value.
Sourcefn load(
&self,
url: &Url,
maybe_whitelist: Option<&[String]>,
skip_soft_errors: bool,
) -> Result<Vec<(String, ConfigurationEntity)>, Error>
fn load( &self, url: &Url, maybe_whitelist: Option<&[String]>, skip_soft_errors: bool, ) -> Result<Vec<(String, ConfigurationEntity)>, Error>
Main method that actually loads configurations.
- Checks the
urland detects its own options from it. - Checks whitelist to load just provided plugins configurations.
- Attempts to load configurations.
- Tries to set format for each ConfigurationEntity.