pub struct ApiKey {
pub name: String,
pub public_id: String,
pub scopes: HashSet<Scopes>,
pub created_at: DateTime<FixedOffset>,
pub expires_at: Option<DateTime<FixedOffset>>,
pub player_id: Option<Uuid>,
}Expand description
ApiKey : Represents an API key.
Fields§
§name: StringThe human-readable name of the API key.
public_id: StringThe public identifier of the API key.
scopes: HashSet<Scopes>The scopes granted to the API key.
created_at: DateTime<FixedOffset>The date and time at which the API key was created.
expires_at: Option<DateTime<FixedOffset>>The date and time at which the API key expires, or null if it does not expire.
player_id: Option<Uuid>The player linked to this API key, or null if the key is not linked to a player.
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 StructuralPartialEq for ApiKey
Auto Trait Implementations§
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