Struct EnvKeyProvider
pub struct EnvKeyProvider;Expand description
Loads a ClientKey from CS_CLIENT_ID and CS_CLIENT_KEY environment variables.
Returns KeyProviderError::NotConfigured if either variable is unset,
or KeyProviderError::InvalidKey if the values cannot be parsed.
§Example
use cipherstash_client::zerokms::{EnvKeyProvider, KeyProvider};
let provider = EnvKeyProvider;
let key = provider.client_key().await.expect("env vars must be set");Trait Implementations§
§impl KeyProvider for EnvKeyProvider
impl KeyProvider for EnvKeyProvider
§async fn client_key(&self) -> Result<ClientKey, KeyProviderError>
async fn client_key(&self) -> Result<ClientKey, KeyProviderError>
Load a
ClientKey from this provider.Auto Trait Implementations§
impl Freeze for EnvKeyProvider
impl RefUnwindSafe for EnvKeyProvider
impl Send for EnvKeyProvider
impl Sync for EnvKeyProvider
impl Unpin for EnvKeyProvider
impl UnsafeUnpin for EnvKeyProvider
impl UnwindSafe for EnvKeyProvider
Blanket Implementations§
impl<T> AuthStrategyBounds for T
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more