Struct bonsaidb::keystorage::s3::aws_sdk_s3::config::Credentials
pub struct Credentials(/* private fields */);
Expand description
AWS SDK Credentials
An opaque struct representing credentials that may be used in an AWS SDK, modeled on the CRT credentials implementation.
When Credentials
is dropped, its contents are zeroed in memory. Credentials uses an interior Arc to ensure
that even when cloned, credentials don’t exist in multiple memory locations.
Implementations§
§impl Credentials
impl Credentials
pub fn new(
access_key_id: impl Into<String>,
secret_access_key: impl Into<String>,
session_token: Option<String>,
expires_after: Option<SystemTime>,
provider_name: &'static str
) -> Credentials
pub fn new( access_key_id: impl Into<String>, secret_access_key: impl Into<String>, session_token: Option<String>, expires_after: Option<SystemTime>, provider_name: &'static str ) -> Credentials
Creates Credentials
.
This is intended to be used from a custom credentials provider implementation. It is NOT secure to hardcode credentials into your application.
pub fn access_key_id(&self) -> &str
pub fn access_key_id(&self) -> &str
Returns the access key ID.
pub fn secret_access_key(&self) -> &str
pub fn secret_access_key(&self) -> &str
Returns the secret access key.
pub fn expiry(&self) -> Option<SystemTime>
pub fn expiry(&self) -> Option<SystemTime>
Returns the time when the credentials will expire.
pub fn expiry_mut(&mut self) -> &mut Option<SystemTime>
pub fn expiry_mut(&mut self) -> &mut Option<SystemTime>
Returns a mutable reference to the time when the credentials will expire.
pub fn session_token(&self) -> Option<&str>
pub fn session_token(&self) -> Option<&str>
Returns the session token.
Trait Implementations§
§impl Clone for Credentials
impl Clone for Credentials
§fn clone(&self) -> Credentials
fn clone(&self) -> Credentials
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 more§impl Debug for Credentials
impl Debug for Credentials
§impl PartialEq for Credentials
impl PartialEq for Credentials
§fn eq(&self, other: &Credentials) -> bool
fn eq(&self, other: &Credentials) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl ProvideCredentials for Credentials
impl ProvideCredentials for Credentials
§fn provide_credentials<'a>(&'a self) -> ProvideCredentials<'a>where
Credentials: 'a,
fn provide_credentials<'a>(&'a self) -> ProvideCredentials<'a>where
Credentials: 'a,
Returns a future that provides credentials.
§fn fallback_on_interrupt(&self) -> Option<Credentials>
fn fallback_on_interrupt(&self) -> Option<Credentials>
Returns fallback credentials. Read more
impl Eq for Credentials
impl StructuralEq for Credentials
impl StructuralPartialEq for Credentials
Auto Trait Implementations§
impl RefUnwindSafe for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnwindSafe for Credentials
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.