pub struct UpdateApiKeyInput {Show 13 fields
pub key_id: Id,
pub user_id: Option<Id>,
pub name: Option<String>,
pub enabled: Option<bool>,
pub expires_in: Option<Option<i64>>,
pub metadata: Option<Option<Value>>,
pub remaining: Option<i64>,
pub refill_amount: Option<i64>,
pub refill_interval: Option<i64>,
pub rate_limit_enabled: Option<bool>,
pub rate_limit_time_window: Option<i64>,
pub rate_limit_max: Option<i64>,
pub permissions: Option<Option<Permissions>>,
}Expand description
The body of /api-key/update. Absent fields are left alone. Some(None) (JSON
null) clears expires_in, metadata and permissions.
Fields§
§key_id: Id§user_id: Option<Id>Server-only: the owner when there is no session.
name: Option<String>§enabled: Option<bool>§expires_in: Option<Option<i64>>Seconds from now; null removes the expiry.
metadata: Option<Option<Value>>Ignored unless enable_metadata is on.
remaining: Option<i64>Server-only, at least 1.
refill_amount: Option<i64>Server-only, with refill_interval.
refill_interval: Option<i64>Server-only, with refill_amount.
rate_limit_enabled: Option<bool>Server-only.
rate_limit_time_window: Option<i64>Server-only.
rate_limit_max: Option<i64>Server-only.
permissions: Option<Option<Permissions>>Server-only.
Implementations§
Trait Implementations§
Source§impl Clone for UpdateApiKeyInput
impl Clone for UpdateApiKeyInput
Source§impl Debug for UpdateApiKeyInput
impl Debug for UpdateApiKeyInput
Source§impl<'de> Deserialize<'de> for UpdateApiKeyInput
impl<'de> Deserialize<'de> for UpdateApiKeyInput
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 Forget for UpdateApiKeyInput
impl Freeze for UpdateApiKeyInput
impl Move for UpdateApiKeyInput
impl RefUnwindSafe for UpdateApiKeyInput
impl Send for UpdateApiKeyInput
impl Sync for UpdateApiKeyInput
impl Unpin for UpdateApiKeyInput
impl UnsafeUnpin for UpdateApiKeyInput
impl UnwindSafe for UpdateApiKeyInput
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