pub struct ApiToken {
pub id: i64,
pub name: String,
pub user_id: i64,
pub org: Option<OrgId>,
pub created_at: i64,
pub last_used: Option<i64>,
pub expires_at: Option<i64>,
pub scopes: Vec<String>,
}Expand description
An API token’s metadata.
Fields§
§id: i64§name: String§user_id: i64§org: Option<OrgId>None: a platform token, acting with all of its (platform admin)
owner’s access. Some: confined to that org.
created_at: i64§last_used: Option<i64>§expires_at: Option<i64>§scopes: Vec<String>Restrictions on top of the role (Scope); empty: the role’s
whole reach.
Trait Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.