pub struct Loader<'a> { /* private fields */ }Expand description
Collects the inputs of one load.
Implementations§
Source§impl<'a> Loader<'a>
impl<'a> Loader<'a>
Sourcepub fn new(schema: &'a Schema) -> Self
pub fn new(schema: &'a Schema) -> Self
A loader over schema with no file, environment, arguments or modules yet.
Sourcepub fn modules(self, modules: &'a Modules) -> Self
pub fn modules(self, modules: &'a Modules) -> Self
The modules that values with a provider are checked by.
Sourcepub fn file(self, name: &str, text: &str) -> Self
pub fn file(self, name: &str, text: &str) -> Self
A TOML configuration file’s text, and the name to show for it.
Sourcepub fn env(self, env: BTreeMap<String, String>) -> Self
pub fn env(self, env: BTreeMap<String, String>) -> Self
Environment variables (the whole environment is fine: only declared names and unknown
names under the schema’s env_prefix matter).
Sourcepub fn resolved(self, values: BTreeMap<String, String>) -> Self
pub fn resolved(self, values: BTreeMap<String, String>) -> Self
Secrets fetched from their sources, by key (the configurant-secrets crate does the fetching). Each
key must be a secret value that declares a source; anything else is refused. They are checked
and redacted like the same secret from the environment, which overrides them.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Loader<'a>
impl<'a> !Send for Loader<'a>
impl<'a> !Sync for Loader<'a>
impl<'a> !UnwindSafe for Loader<'a>
impl<'a> Forget for Loader<'a>
impl<'a> Freeze for Loader<'a>
impl<'a> Move for Loader<'a>
impl<'a> Unpin for Loader<'a>
impl<'a> UnsafeUnpin for Loader<'a>where
&'a Schema: UnsafeUnpin,
&'a Modules: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
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