pub struct SecurityToken { /* private fields */ }Expand description
Security token.
Implementations§
Source§impl SecurityToken
impl SecurityToken
Sourcepub fn try_new(
access_key_id: AccessKeyId,
expires_at: DateTime,
key: impl AsRef<[u8]>,
) -> Result<Self, Error>
pub fn try_new( access_key_id: AccessKeyId, expires_at: DateTime, key: impl AsRef<[u8]>, ) -> Result<Self, Error>
Attempts to create a new instance.
Sourcepub fn access_key_id(&self) -> &AccessKeyId
pub fn access_key_id(&self) -> &AccessKeyId
Returns the access key ID.
Sourcepub fn expires_at(&self) -> DateTime
pub fn expires_at(&self) -> DateTime
Returns the expires time.
Sourcepub fn expires_in(&self) -> Duration
pub fn expires_in(&self) -> Duration
Returns the time when the security token will expire in.
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Returns true if the security token has expired.
Sourcepub fn parse_with(
token: String,
key: &[u8],
) -> Result<Self, ParseSecurityTokenError>
pub fn parse_with( token: String, key: &[u8], ) -> Result<Self, ParseSecurityTokenError>
Parses the token with the encryption key.
Trait Implementations§
Source§impl AsRef<[u8]> for SecurityToken
impl AsRef<[u8]> for SecurityToken
Source§impl Clone for SecurityToken
impl Clone for SecurityToken
Source§fn clone(&self) -> SecurityToken
fn clone(&self) -> SecurityToken
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 moreSource§impl Debug for SecurityToken
impl Debug for SecurityToken
Auto Trait Implementations§
impl Freeze for SecurityToken
impl RefUnwindSafe for SecurityToken
impl Send for SecurityToken
impl Sync for SecurityToken
impl Unpin for SecurityToken
impl UnwindSafe for SecurityToken
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.