pub struct ApiToken {
pub id: Uuid,
pub owner_user_id: Uuid,
pub kind: ApiTokenKind,
pub name: String,
pub prefix: String,
pub permissions: Option<Vec<PermissionName>>,
pub last_used_at: Option<DateTime<Utc>>,
pub expires_at: Option<DateTime<Utc>>,
pub revoked_at: Option<DateTime<Utc>>,
pub created_at: DateTime<Utc>,
}Expand description
Listed / detail representation of an api_token row. Never includes the
plaintext token — that field exists only on CreateTokenResponse.
Fields§
§id: Uuid§owner_user_id: Uuid§kind: ApiTokenKind§name: String§prefix: StringFirst 12 chars of the plaintext token, e.g. swhv_pat_AbC. Safe to
display in lists to disambiguate tokens with similar names.
permissions: Option<Vec<PermissionName>>None for PAT (live from owner roles); Some(subset) for API Token.
last_used_at: Option<DateTime<Utc>>§expires_at: Option<DateTime<Utc>>§revoked_at: Option<DateTime<Utc>>§created_at: DateTime<Utc>Trait Implementations§
Source§impl<'de> Deserialize<'de> for ApiToken
impl<'de> Deserialize<'de> for ApiToken
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
impl Eq for ApiToken
impl StructuralPartialEq for ApiToken
Auto Trait Implementations§
impl Freeze for ApiToken
impl RefUnwindSafe for ApiToken
impl Send for ApiToken
impl Sync for ApiToken
impl Unpin for ApiToken
impl UnsafeUnpin for ApiToken
impl UnwindSafe for ApiToken
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§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.