pub struct TokenMeta {
pub version: u32,
pub label: String,
pub roles: Vec<GrantedRole>,
pub created_at: u64,
pub expires_at: Option<u64>,
pub revocation_id: String,
}Expand description
Metadata for an issued token (authz/tokens/<id>). The token itself is
shown once at creation and never stored; this is what token ls reports and
what token rm needs to find the revocation id. Schema v1.
Fields§
§version: u32Pinned schema discriminant (v1).
label: StringHuman label for the token.
roles: Vec<GrantedRole>The roles the token grants.
created_at: u64Unix timestamp (seconds) of creation.
expires_at: Option<u64>Unix timestamp (seconds) of expiry, if the token carries a TTL.
revocation_id: StringThe authority revocation id (hex) — also the authz/tokens/<id> key and
the argument to token rm.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TokenMeta
impl<'de> Deserialize<'de> for TokenMeta
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TokenMeta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TokenMeta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TokenMeta
Source§impl Serialize for TokenMeta
impl Serialize for TokenMeta
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TokenMeta
Auto Trait Implementations§
impl Freeze for TokenMeta
impl RefUnwindSafe for TokenMeta
impl Send for TokenMeta
impl Sync for TokenMeta
impl Unpin for TokenMeta
impl UnsafeUnpin for TokenMeta
impl UnwindSafe for TokenMeta
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.