pub struct ApiKey {
pub id: i64,
pub name: String,
pub ending: String,
pub created_at: Timestamp,
pub last_used_at: Option<Timestamp>,
}Expand description
One of a user’s API keys, as they list them: never the key itself, of
which the controller keeps only the SHA-256. A request that bears it
(Authorization: Bearer <key>) acts as its user.
Fields§
§id: i64§name: String§ending: StringThe key’s last four characters, to tell it from the user’s others.
created_at: Timestamp§last_used_at: Option<Timestamp>When a request last bore it, to the minute; None if none has.
Implementations§
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
impl Eq for ApiKey
impl StructuralPartialEq for ApiKey
Auto Trait Implementations§
impl Forget for ApiKey
impl Freeze for ApiKey
impl RefUnwindSafe for ApiKey
impl Send for ApiKey
impl Sync for ApiKey
impl Unpin for ApiKey
impl UnsafeUnpin 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