pub struct Configuration { /* private fields */ }

Implementations§

source§

impl Configuration

source

pub fn new() -> Self

source§

impl Configuration

source

pub fn with_source<S>(self, source: S) -> Selfwhere S: Into<Url>,

source

pub fn add_source<S>(&mut self, source: S)where S: Into<Url>,

source

pub fn has_source<S>(&mut self, source: S) -> boolwhere S: Into<Url>,

source

pub fn with_source_and_loader<S, L>(self, source: S, loader: L) -> Selfwhere S: Into<Url>, L: ConfigurationLoader + 'static,

source

pub fn add_source_and_loader<S, L>(&mut self, source: S, loader: L)where S: Into<Url>, L: ConfigurationLoader + 'static,

source

pub fn with_source_and_boxed_loader<S>( self, source: S, loader: Box<dyn ConfigurationLoader> ) -> Selfwhere S: Into<Url>,

source

pub fn add_source_and_boxed_loader<S>( &mut self, source: S, loader: Box<dyn ConfigurationLoader> )where S: Into<Url>,

source

pub fn remove_source_and_loader<S>(&mut self, source: S) -> boolwhere S: Into<Url>,

source

pub fn take_boxed_loader<S>( &mut self, source: S ) -> Option<Box<dyn ConfigurationLoader>>where S: Into<Url>,

source

pub fn get_boxed_loader<S>( &self, source: S ) -> Option<Arc<RwLock<Box<dyn ConfigurationLoader>>>>where S: Into<Url>,

source

pub fn with_generic_loader<L>(self, loader: L) -> Selfwhere L: ConfigurationLoader + 'static,

source

pub fn add_generic_loader<L>(&mut self, loader: L)where L: ConfigurationLoader + 'static,

source

pub fn with_generic_boxed_loader( self, loader: Box<dyn ConfigurationLoader> ) -> Self

source

pub fn add_generic_boxed_loader(&mut self, loader: Box<dyn ConfigurationLoader>)

source§

impl Configuration

source

pub fn with_parser<P>(self, parser: P) -> Selfwhere P: ConfigurationParser + 'static,

source

pub fn add_parser<P>(&mut self, parser: P)where P: ConfigurationParser + 'static,

source§

impl Configuration

source

pub fn set_whitelist<P: AsRef<str>>(&mut self, whitelist: Vec<P>)

source

pub fn with_whitelist<P: AsRef<str>>(self, whitelist: Vec<P>) -> Self

source§

impl Configuration

source

pub fn configuration(&self) -> &HashMap<String, Input>

source

pub fn configuration_mut(&mut self) -> &mut HashMap<String, Input>

source§

impl Configuration

source

pub fn with_forget_loaded(self, flag: bool) -> Self

source

pub fn set_forget_loaded(&mut self, flag: bool)

source

pub fn forget_loaded(&mut self)

source

pub fn with_forget_parsed(self, flag: bool) -> Self

source

pub fn set_forget_parsed(&mut self, flag: bool)

source

pub fn forget_parsed(&mut self)

source§

impl Configuration

source

pub fn try_load( &mut self, skip_retryable: bool ) -> Result<(), ConfigurationLoadError>

source

pub fn try_parse(&mut self) -> Result<(), ConfigurationError>

source

pub fn merge(&mut self)

source

pub fn try_validate( &mut self, definitions: &HashMap<String, InputDefinition> ) -> Result<(), InputValidateError>

source

pub fn try_load_parse_merge( &mut self, skip_retryable: bool ) -> Result<(), ConfigurationError>

source

pub fn try_load_parse_merge_validate( &mut self, skip_retryable: bool, definitions: &HashMap<String, InputDefinition> ) -> Result<(), ConfigurationError>

Trait Implementations§

source§

impl Debug for Configuration

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Configuration

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.