pub struct Credentials {
pub access_key: String,
pub secret_key: String,
pub session_token: String,
pub expiration: Option<OffsetDateTime>,
pub status: String,
pub parent_user: String,
pub groups: Option<Vec<String>>,
pub claims: Option<HashMap<String, Value>>,
pub name: Option<String>,
pub description: Option<String>,
}Expand description
Credentials structure
Fields:
- access_key: Access key string
- secret_key: Secret key string
- session_token: Session token string
- expiration: Optional expiration time as OffsetDateTime
- status: Status string (e.g., “active”, “off”)
- parent_user: Parent user string
- groups: Optional list of groups
- claims: Optional map of claims
- name: Optional name string
- description: Optional description string
Fields§
§access_key: String§secret_key: String§session_token: String§expiration: Option<OffsetDateTime>§status: String§parent_user: String§groups: Option<Vec<String>>§claims: Option<HashMap<String, Value>>§name: Option<String>§description: Option<String>Implementations§
Source§impl Credentials
impl Credentials
Sourcepub fn claims_or_empty(&self) -> &HashMap<String, Value>
pub fn claims_or_empty(&self) -> &HashMap<String, Value>
Returns a reference to this credential’s claims, or a shared empty map
when the credential has no claims attached. Avoids per-call allocation
at call sites that need an &HashMap<String, Value>.
pub fn is_expired(&self) -> bool
pub fn is_temp(&self) -> bool
pub fn is_service_account(&self) -> bool
pub fn is_implied_policy(&self) -> bool
pub fn is_valid(&self) -> bool
pub fn is_owner(&self) -> bool
Trait Implementations§
Source§impl Clone for Credentials
impl Clone for Credentials
Source§impl Debug for Credentials
impl Debug for Credentials
Source§impl Default for Credentials
impl Default for Credentials
Source§impl<'de> Deserialize<'de> for Credentials
impl<'de> Deserialize<'de> for Credentials
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for Credentials
impl Freeze for Credentials
impl Move for Credentials
impl RefUnwindSafe for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnsafeUnpin for Credentialswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(String, Value)>: UnsafeUnpin,
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