pub struct Secret { /* private fields */ }
Expand description
A representation of a secret in Secrets Manager.
Implementations§
Source§impl Secret
impl Secret
Sourcepub async fn get_raw(&self) -> Result<String>
pub async fn get_raw(&self) -> Result<String>
Get the plaintext value of this secret.
Usually, this is in json format, but it can be any data format that you provide to Secrets Manager.
Sourcepub async fn get_single(&self, name: impl AsRef<str>) -> Result<String>
pub async fn get_single(&self, name: impl AsRef<str>) -> Result<String>
Get a value by name from within this secret.
Sourcepub async fn get_typed<T: DeserializeOwned>(&self) -> Result<T>
pub async fn get_typed<T: DeserializeOwned>(&self) -> Result<T>
Get the value of this secret, represented as a strongly-typed T.
Trait Implementations§
impl Eq for Secret
Auto Trait Implementations§
impl Freeze for Secret
impl !RefUnwindSafe for Secret
impl Send for Secret
impl Sync for Secret
impl Unpin for Secret
impl !UnwindSafe for Secret
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.