pub struct SecretStoreCredentials { /* private fields */ }Expand description
Adapter over CodeWhale’s existing durable secret store.
This changes no on-disk format: it reads and writes exactly the slots
codewhale_secrets::Secrets already owns. Its value is that every write now
goes through modify under the provider’s lock, so a save racing a rotate
no longer interleaves.
Implementations§
Trait Implementations§
Source§impl CredentialStore for SecretStoreCredentials
impl CredentialStore for SecretStoreCredentials
Source§fn read(&self, provider_id: &str) -> Result<Option<Credential>>
fn read(&self, provider_id: &str) -> Result<Option<Credential>>
Read the stored credential, possibly expired. Display/status use.
Source§fn list(&self) -> Result<Vec<CredentialInfo>>
fn list(&self) -> Result<Vec<CredentialInfo>>
List stored credential metadata without exposing secrets. Read more
Source§fn modify(
&self,
provider_id: &str,
f: &mut dyn FnMut(Option<Credential>) -> Result<Option<Credential>>,
) -> Result<Option<Credential>>
fn modify( &self, provider_id: &str, f: &mut dyn FnMut(Option<Credential>) -> Result<Option<Credential>>, ) -> Result<Option<Credential>>
Serialized write — the only write path.
f sees the current
credential because correct writes (refresh, login-during-refresh)
depend on it; return the new credential, or None to leave the entry
unchanged. Mutual exclusion is per provider id. Yields the post-write
credential. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SecretStoreCredentials
impl !UnwindSafe for SecretStoreCredentials
impl Forget for SecretStoreCredentials
impl Freeze for SecretStoreCredentials
impl Move for SecretStoreCredentials
impl Send for SecretStoreCredentials
impl Sync for SecretStoreCredentials
impl Unpin for SecretStoreCredentials
impl UnsafeUnpin for SecretStoreCredentials
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.