Trait salak::PropertySource [−][src]
An abstract source loader from various sources, such as command line arguments, system environment, files, etc.
Required methods
fn name(&self) -> String
[src]
PropertySource
name.
fn get_property(&self, key: &str) -> Option<Property>
[src]
Get property by name.
fn is_empty(&self) -> bool
[src]
Check whether the PropertySource
is empty.
Empty source will not be ignored when register to registry.
fn get_keys(&self, prefix: &str) -> Vec<String>
[src]
Find all next level keys with prefix.
fn load(&self) -> Result<Option<Box<dyn PropertySource>>, PropertyError>
[src]
Reload PropertySource
, if this PropertySource
not support reload, then just return Ok(None)
.
Provided methods
fn contains_property(&self, key: &str) -> bool
[src]
Check whether property exists.