pub struct ApiToken {
pub created_at: DateTime<Utc>,
pub description: Option<String>,
pub expires_at: Option<DateTime<Utc>>,
pub id: Uuid,
pub last_used_at: Option<DateTime<Utc>>,
}Expand description
A personal API key. The secret is returned only once, at creation.
JSON schema
{
"title": "ApiToken",
"description": "A personal API key. The secret is returned only once,
at creation.",
"type": "object",
"required": [
"created_at",
"id"
],
"properties": {
"created_at": {
"description": "When the key was created.",
"type": "string",
"format": "date-time"
},
"description": {
"description": "Human label for the key.",
"type": [
"string",
"null"
]
},
"expires_at": {
"description": "When the key expires, or null if it never
expires.",
"type": [
"string",
"null"
],
"format": "date-time"
},
"id": {
"description": "Stable key id.",
"type": "string",
"format": "uuid"
},
"last_used_at": {
"description": "When the key was last used to authenticate, if
ever.",
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}Fields§
§created_at: DateTime<Utc>When the key was created.
description: Option<String>Human label for the key.
expires_at: Option<DateTime<Utc>>When the key expires, or null if it never expires.
id: UuidStable key id.
last_used_at: Option<DateTime<Utc>>When the key was last used to authenticate, if ever.
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
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