Struct salak::SourceRegistry[][src]

pub struct SourceRegistry { /* fields omitted */ }

An implementation of Environment for registering PropertySource.

Implementations

impl SourceRegistry[src]

pub fn new() -> Self[src]

Create an empty registry.

pub fn with_args(self, mode: SysArgsMode) -> Self[src]

This is supported on crate features enable_clap or enable_pico only.

Add default command line arguments parser.

pub fn with_sys_env(self) -> Self[src]

Add system environment.

pub fn with_toml(self) -> Result<Self, PropertyError>[src]

This is supported on crate feature enable_toml only.

Add toml support.

pub fn with_yaml(self) -> Result<Self, PropertyError>[src]

This is supported on crate feature enable_yaml only.

Add yaml support.

pub fn register_source(&mut self, source: Box<dyn PropertySource>)[src]

Add yaml support. Register source.

pub fn register_sources(&mut self, sources: Vec<Box<dyn PropertySource>>)[src]

Register multiple sources.

Trait Implementations

impl Default for SourceRegistry[src]

impl Environment for SourceRegistry[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,