pub enum Credential {
LongTerm {
secret_id: String,
secret_key: SecretString,
},
Temporary {
secret_id: String,
secret_key: SecretString,
token: SecretString,
},
}Variants§
Implementations§
Source§impl Credential
impl Credential
Sourcepub fn temporary(
secret_id: impl Into<String>,
secret_key: impl Into<String>,
token: impl Into<String>,
) -> Self
pub fn temporary( secret_id: impl Into<String>, secret_key: impl Into<String>, token: impl Into<String>, ) -> Self
创建临时凭证
§参数
secret_id: SecretIdsecret_key: SecretKey(将被 SecretString 保护)token: Token(将被 SecretString 保护)
Sourcepub fn secret_key(&self) -> &SecretString
pub fn secret_key(&self) -> &SecretString
Sourcepub fn token(&self) -> Option<&SecretString>
pub fn token(&self) -> Option<&SecretString>
Trait Implementations§
Source§impl Clone for Credential
impl Clone for Credential
Source§fn clone(&self) -> Credential
fn clone(&self) -> Credential
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 Credential
impl RefUnwindSafe for Credential
impl Send for Credential
impl Sync for Credential
impl Unpin for Credential
impl UnwindSafe for Credential
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