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, Error>
pub fn add_url(&mut self, url: Url) -> Result<(), Error>
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: Loader + 'static,
pub fn add_loader<L>(&mut self, loader: L)where
L: Loader + 'static,
pub fn with_boxed_loader(self, loader: Box<dyn Loader>) -> Self
pub fn add_boxed_loader(&mut self, loader: Box<dyn Loader>)
pub fn remove_loader_and_urls<S: AsRef<str>>( &mut self, scheme: S, ) -> Option<(Box<dyn Loader>, Vec<Url>)>
pub fn load( &self, skip_soft_errors: bool, ) -> Result<Vec<(String, Vec<ConfigurationEntity>)>, Error>
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: Parser + 'static,
pub fn add_parser<P>(&mut self, parser: P)where
P: Parser + 'static,
pub fn with_boxed_parser(self, parser: Box<dyn Parser>) -> Self
pub fn add_boxed_parser(&mut self, parser: Box<dyn Parser>)
pub fn remove_parser<F: AsRef<str>>( &mut self, format: F, ) -> Vec<Box<dyn Parser>>
pub fn load_and_parse( &self, skip_soft_errors: bool, ) -> Result<Vec<(String, Vec<ConfigurationEntity>)>, Error>
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<(), Error>
pub fn set_whitelist_from_env<K: AsRef<str>>( self, key: K, ) -> Result<Self, Error>
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)
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 Freeze for Configuration
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