pub struct PatchedTokenRequest {
pub version: Option<i32>,
pub user: Option<Box<BookmarkRequestUser>>,
pub description: Option<String>,
pub expires: Option<Option<String>>,
pub last_used: Option<Option<String>>,
pub enabled: Option<bool>,
pub write_enabled: Option<bool>,
pub pepper_id: Option<Option<i32>>,
pub token: Option<String>,
}Expand description
PatchedTokenRequest : Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)
Fields§
§version: Option<i32>1- v1 *2- v2
user: Option<Box<BookmarkRequestUser>>§description: Option<String>§expires: Option<Option<String>>§last_used: Option<Option<String>>§enabled: Option<bool>Disable to temporarily revoke this token without deleting it.
write_enabled: Option<bool>Permit create/update/delete operations using this token
pepper_id: Option<Option<i32>>ID of the cryptographic pepper used to hash the token (v2 only)
token: Option<String>Implementations§
Source§impl PatchedTokenRequest
impl PatchedTokenRequest
Sourcepub fn new() -> PatchedTokenRequest
pub fn new() -> PatchedTokenRequest
Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)
Trait Implementations§
Source§impl Clone for PatchedTokenRequest
impl Clone for PatchedTokenRequest
Source§fn clone(&self) -> PatchedTokenRequest
fn clone(&self) -> PatchedTokenRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PatchedTokenRequest
impl Debug for PatchedTokenRequest
Source§impl Default for PatchedTokenRequest
impl Default for PatchedTokenRequest
Source§fn default() -> PatchedTokenRequest
fn default() -> PatchedTokenRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PatchedTokenRequest
impl<'de> Deserialize<'de> for PatchedTokenRequest
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
Source§impl PartialEq for PatchedTokenRequest
impl PartialEq for PatchedTokenRequest
Source§fn eq(&self, other: &PatchedTokenRequest) -> bool
fn eq(&self, other: &PatchedTokenRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PatchedTokenRequest
impl Serialize for PatchedTokenRequest
impl StructuralPartialEq for PatchedTokenRequest
Auto Trait Implementations§
impl Freeze for PatchedTokenRequest
impl RefUnwindSafe for PatchedTokenRequest
impl Send for PatchedTokenRequest
impl Sync for PatchedTokenRequest
impl Unpin for PatchedTokenRequest
impl UnsafeUnpin for PatchedTokenRequest
impl UnwindSafe for PatchedTokenRequest
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