pub struct ConfigSchema {
pub name: String,
pub fields: Vec<ConfigField>,
}Expand description
Configuration schema for defining configuration structures
Fields§
§name: String§fields: Vec<ConfigField>Implementations§
Source§impl ConfigSchema
impl ConfigSchema
pub fn new(name: impl Into<String>) -> Self
pub fn field(self, field: ConfigField) -> Self
Sourcepub fn load_values(&self) -> Result<HashMap<String, String>, ConfigError>
pub fn load_values(&self) -> Result<HashMap<String, String>, ConfigError>
Load configuration values based on schema
Sourcepub fn get_sources(&self) -> HashMap<String, ConfigSource>
pub fn get_sources(&self) -> HashMap<String, ConfigSource>
Get configuration sources for debugging
Auto Trait Implementations§
impl Freeze for ConfigSchema
impl !RefUnwindSafe for ConfigSchema
impl Send for ConfigSchema
impl Sync for ConfigSchema
impl Unpin for ConfigSchema
impl !UnwindSafe for ConfigSchema
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more