pub struct KeyCreationRequest {
pub name: String,
pub role: Role,
pub expires_at: Option<DateTime<Utc>>,
pub ip_whitelist: Option<Vec<String>>,
}
Expand description
Request for creating an API key
Fields§
§name: String
Human-readable name for the key
role: Role
Role to assign to the key
expires_at: Option<DateTime<Utc>>
Optional expiration date
ip_whitelist: Option<Vec<String>>
Optional IP whitelist
Trait Implementations§
Source§impl Clone for KeyCreationRequest
impl Clone for KeyCreationRequest
Source§fn clone(&self) -> KeyCreationRequest
fn clone(&self) -> KeyCreationRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for KeyCreationRequest
impl Debug for KeyCreationRequest
Source§impl<'de> Deserialize<'de> for KeyCreationRequest
impl<'de> Deserialize<'de> for KeyCreationRequest
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 KeyCreationRequest
impl RefUnwindSafe for KeyCreationRequest
impl Send for KeyCreationRequest
impl Sync for KeyCreationRequest
impl Unpin for KeyCreationRequest
impl UnwindSafe for KeyCreationRequest
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