Struct plugx_config::Configuration
source · pub struct Configuration { /* private fields */ }Implementations§
source§impl Configuration
impl Configuration
source§impl Configuration
impl Configuration
pub fn url_list(&self) -> &[Url]
pub fn has_url(&mut self, url: &Url) -> bool
pub fn has_url_scheme(&mut self, url: &Url) -> bool
pub fn with_url(self, url: Url) -> Result<Self, ConfigurationLoadError>
pub fn add_url(&mut self, url: Url) -> Result<(), ConfigurationLoadError>
pub fn remove_url(&mut self, url: &Url) -> bool
pub fn remove_scheme<S: AsRef<str>>(&mut self, scheme: S) -> Vec<Url>
source§impl Configuration
impl Configuration
pub fn has_loader(&mut self, url: &Url) -> bool
pub fn with_loader<L>(self, loader: L) -> Selfwhere
L: ConfigurationLoader + 'static,
pub fn add_loader<L>(&mut self, loader: L)where
L: ConfigurationLoader + 'static,
pub fn with_boxed_loader(self, loader: Box<dyn ConfigurationLoader>) -> Self
pub fn add_boxed_loader(&mut self, loader: Box<dyn ConfigurationLoader>)
pub fn remove_loader_and_urls<S: AsRef<str>>( &mut self, scheme: S ) -> Option<(Box<dyn ConfigurationLoader>, Vec<Url>)>
pub fn load( &self, skip_soft_errors: bool ) -> Result<Vec<(String, Vec<ConfigurationEntity>)>, ConfigurationLoadError>
source§impl Configuration
impl Configuration
pub fn has_parser<F: AsRef<str>>(&self, format: F) -> bool
pub fn with_parser<P>(self, parser: P) -> Selfwhere
P: ConfigurationParser + 'static,
pub fn add_parser<P>(&mut self, parser: P)where
P: ConfigurationParser + 'static,
pub fn with_boxed_parser(self, parser: Box<dyn ConfigurationParser>) -> Self
pub fn add_boxed_parser(&mut self, parser: Box<dyn ConfigurationParser>)
pub fn remove_parser<F: AsRef<str>>( &mut self, format: F ) -> Vec<Box<dyn ConfigurationParser>>
pub fn load_and_parse( &self, skip_soft_errors: bool ) -> Result<Vec<(String, Vec<ConfigurationEntity>)>, ConfigurationError>
source§impl Configuration
impl Configuration
pub fn is_in_whitelist<P: AsRef<str>>(&self, name: P) -> bool
pub fn load_whitelist_from_env<K: AsRef<str>>( &mut self, key: K ) -> Result<(), ConfigurationError>
pub fn set_whitelist_from_env<K: AsRef<str>>( self, key: K ) -> Result<Self, ConfigurationError>
pub fn set_whitelist<N: AsRef<str>>(&mut self, whitelist: &[N])
pub fn with_whitelist<N: AsRef<str>>(self, whitelist: &[N]) -> Self
pub fn add_to_whitelist<N: AsRef<str>>(&mut self, name: N)
source§impl Configuration
impl Configuration
pub fn load_parse_merge( &self, skip_soft_errors: bool ) -> Result<Vec<(String, Input)>, ConfigurationError>
pub fn load_parse_merge_validate( &self, schema_list: &[(String, InputSchemaType)], skip_soft_errors: bool ) -> Result<Vec<(String, Input)>, ConfigurationError>
Trait Implementations§
source§impl Debug for Configuration
impl Debug for Configuration
source§impl Default for Configuration
impl Default for Configuration
source§fn default() -> Configuration
fn default() -> Configuration
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Configuration
impl Send for Configuration
impl Sync for Configuration
impl Unpin for Configuration
impl !UnwindSafe for Configuration
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