pub enum Source {
ConfigFiles(Vec<FileOptions>),
Clap(ClapSource),
Env(HashMap<String, String>),
}
Expand description
Replacement of the usual source to find values for the fields.
Variants§
ConfigFiles(Vec<FileOptions>)
Configuration files.
Note: It is allowed to specify multiple files: all of them will be merged. If there is a collision (the values of a particular key have been specified in two or more files), the value will be assigned from the file that has been described later.
Clap(ClapSource)
Command line source.
Env(HashMap<String, String>)
Map that replaces the enviromnent (fields, annotated with #[source(env)] will be searched in this map).
Can be useful in testing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Source
impl !RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl !UnwindSafe for Source
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