pub struct Credentials { /* private fields */ }Expand description
Represents credentials access key, secret key and session token.
Implementations§
Source§impl Credentials
impl Credentials
pub fn new<T1: Into<String>, T2: Into<String>>( ak: T1, sk: T2, st: Option<String>, exp: Option<i64>, ) -> Self
Sourcepub fn access_key(&self) -> &str
pub fn access_key(&self) -> &str
Get access key.
Sourcepub fn secret_key(&self) -> &str
pub fn secret_key(&self) -> &str
Get secret key.
Sourcepub fn session_token(&self) -> Option<&String>
pub fn session_token(&self) -> Option<&String>
Get session token.
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Check whether this credentials expired or not.
Trait Implementations§
Source§impl Clone for Credentials
impl Clone for Credentials
Source§fn clone(&self) -> Credentials
fn clone(&self) -> Credentials
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for Credentials
impl RefUnwindSafe for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnwindSafe for Credentials
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