pub struct EnvSecretsProvider<'a> { /* private fields */ }
Expand description
A common implementation that retrieves the key and secret from the given environment variable names.
This retrieves secrets once from the environment and caches them. If your use case requires retrieving them each time, a custom implementation may be your best choice.
Implementations§
Source§impl<'a> EnvSecretsProvider<'a>
impl<'a> EnvSecretsProvider<'a>
Sourcepub fn new(key_name: &'a str, secret_name: &'a str) -> EnvSecretsProvider<'a>
pub fn new(key_name: &'a str, secret_name: &'a str) -> EnvSecretsProvider<'a>
Creates an instance that will retrieve secrets by environment variables, looking for key_name
and secret_name
.
Trait Implementations§
Source§impl<'a> Clone for EnvSecretsProvider<'a>
impl<'a> Clone for EnvSecretsProvider<'a>
Source§fn clone(&self) -> EnvSecretsProvider<'a>
fn clone(&self) -> EnvSecretsProvider<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for EnvSecretsProvider<'a>
impl<'a> Debug for EnvSecretsProvider<'a>
Source§impl<'a> SecretsProvider for EnvSecretsProvider<'a>
impl<'a> SecretsProvider for EnvSecretsProvider<'a>
fn get_secrets(&mut self) -> Secrets
Auto Trait Implementations§
impl<'a> Freeze for EnvSecretsProvider<'a>
impl<'a> RefUnwindSafe for EnvSecretsProvider<'a>
impl<'a> Send for EnvSecretsProvider<'a>
impl<'a> Sync for EnvSecretsProvider<'a>
impl<'a> Unpin for EnvSecretsProvider<'a>
impl<'a> UnwindSafe for EnvSecretsProvider<'a>
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