pub struct ApiKey {
pub id: Uuid,
pub key: String,
pub owner_id: Uuid,
pub is_active: bool,
pub created_at: DateTime<Utc>,
pub expires_at: Option<DateTime<Utc>>,
pub description: Option<String>,
pub last_used_at: Option<DateTime<Utc>>,
}Expand description
Represents an API key (legacy).
Fields§
§id: UuidThe unique ID of the API key.
key: StringThe API key string.
owner_id: UuidThe ID of the user who owns the key.
is_active: boolIndicates if the API key is active.
created_at: DateTime<Utc>The timestamp of when the key was created.
expires_at: Option<DateTime<Utc>>The expiration date of the key, if any.
description: Option<String>A description of the key.
last_used_at: Option<DateTime<Utc>>The timestamp of when the key was last used.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ApiKey
impl<'de> Deserialize<'de> for ApiKey
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 ApiKey
impl RefUnwindSafe for ApiKey
impl Send for ApiKey
impl Sync for ApiKey
impl Unpin for ApiKey
impl UnwindSafe for ApiKey
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