pub struct StaticSecretsProvider<'a> { /* private fields */ }
Expand description
A SecretsProvider that stores the key and secret directly. This is useful if you don’t wish to provide a custom implementation, and will directly instantiate a StaticSecretsProvider with your key and secret.
This is not recommended for use outside of testing! It is relatively unsafe to store the key
and secret as plain text outside of secrecy, and would be downright unsafe to store the key
and secret in source-code by directly creating a StaticSecretsProvider with 'static
strings.
Implementations§
Source§impl<'a> StaticSecretsProvider<'a>
impl<'a> StaticSecretsProvider<'a>
pub fn new(key: &'a str, secret: &'a str) -> StaticSecretsProvider<'a>
Trait Implementations§
Source§impl<'a> Clone for StaticSecretsProvider<'a>
impl<'a> Clone for StaticSecretsProvider<'a>
Source§fn clone(&self) -> StaticSecretsProvider<'a>
fn clone(&self) -> StaticSecretsProvider<'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 StaticSecretsProvider<'a>
impl<'a> Debug for StaticSecretsProvider<'a>
Source§impl<'a> SecretsProvider for StaticSecretsProvider<'a>
impl<'a> SecretsProvider for StaticSecretsProvider<'a>
fn get_secrets(&mut self) -> Secrets
Auto Trait Implementations§
impl<'a> Freeze for StaticSecretsProvider<'a>
impl<'a> RefUnwindSafe for StaticSecretsProvider<'a>
impl<'a> Send for StaticSecretsProvider<'a>
impl<'a> Sync for StaticSecretsProvider<'a>
impl<'a> Unpin for StaticSecretsProvider<'a>
impl<'a> UnwindSafe for StaticSecretsProvider<'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