pub struct CredentialRegistry { /* private fields */ }Expand description
Validated references plus provider implementations, without serialized secret values.
Implementations§
Source§impl CredentialRegistry
impl CredentialRegistry
pub fn new(declarations: Vec<CredentialConfig>) -> Result<Self, CredentialError>
Sourcepub fn register_provider(
&mut self,
name: String,
provider: Arc<dyn CredentialProvider>,
) -> Result<(), CredentialError>
pub fn register_provider( &mut self, name: String, provider: Arc<dyn CredentialProvider>, ) -> Result<(), CredentialError>
Registration cannot replace an existing provider, including the built-in env adapter.
pub fn kind(&self, name: &str) -> Result<CredentialKind, CredentialError>
pub fn cache_lifetime( &self, name: &str, ) -> Result<CredentialCacheLifetime, CredentialError>
pub fn resolve(&self, name: &str) -> Result<CredentialMaterial, CredentialError>
pub fn update( &self, name: &str, material: Vec<u8>, ) -> Result<(), CredentialError>
Auto Trait Implementations§
impl !RefUnwindSafe for CredentialRegistry
impl !UnwindSafe for CredentialRegistry
impl Forget for CredentialRegistry
impl Freeze for CredentialRegistrywhere
*const LeafNode<String, CredentialConfig> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, CredentialConfig)>>: Freeze,
*const LeafNode<String, Arc<dyn CredentialProvider>> is !null: Freeze,
PhantomData<Box<(String, Arc<dyn CredentialProvider>)>>: Freeze,
impl Move for CredentialRegistry
impl Send for CredentialRegistrywhere
NodeRef<Owned, String, CredentialConfig, LeafOrInternal>: Send,
BoxRaw<(String, CredentialConfig)>: Send,
NodeRef<Owned, String, Arc<dyn CredentialProvider>, LeafOrInternal>: Send,
BoxRaw<(String, Arc<dyn CredentialProvider>)>: Send,
impl Sync for CredentialRegistrywhere
NodeRef<Owned, String, CredentialConfig, LeafOrInternal>: Sync,
BoxRaw<(String, CredentialConfig)>: Sync,
NodeRef<Owned, String, Arc<dyn CredentialProvider>, LeafOrInternal>: Sync,
BoxRaw<(String, Arc<dyn CredentialProvider>)>: Sync,
impl Unpin for CredentialRegistrywhere
*const LeafNode<String, CredentialConfig> is !null: Unpin,
Box<(String, CredentialConfig)>: Unpin,
*const LeafNode<String, Arc<dyn CredentialProvider>> is !null: Unpin,
Box<(String, Arc<dyn CredentialProvider>)>: Unpin,
impl UnsafeUnpin for CredentialRegistrywhere
*const LeafNode<String, CredentialConfig> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, CredentialConfig)>>: UnsafeUnpin,
*const LeafNode<String, Arc<dyn CredentialProvider>> is !null: UnsafeUnpin,
PhantomData<Box<(String, Arc<dyn CredentialProvider>)>>: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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