pub struct PatchedBulkTokenRequest {
pub id: i32,
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
PatchedBulkTokenRequest : 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§
§id: i32§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 PatchedBulkTokenRequest
impl PatchedBulkTokenRequest
Sourcepub fn new(id: i32) -> PatchedBulkTokenRequest
pub fn new(id: i32) -> PatchedBulkTokenRequest
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 PatchedBulkTokenRequest
impl Clone for PatchedBulkTokenRequest
Source§fn clone(&self) -> PatchedBulkTokenRequest
fn clone(&self) -> PatchedBulkTokenRequest
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 PatchedBulkTokenRequest
impl Debug for PatchedBulkTokenRequest
Source§impl Default for PatchedBulkTokenRequest
impl Default for PatchedBulkTokenRequest
Source§fn default() -> PatchedBulkTokenRequest
fn default() -> PatchedBulkTokenRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PatchedBulkTokenRequest
impl<'de> Deserialize<'de> for PatchedBulkTokenRequest
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 PatchedBulkTokenRequest
impl PartialEq for PatchedBulkTokenRequest
Source§impl Serialize for PatchedBulkTokenRequest
impl Serialize for PatchedBulkTokenRequest
impl StructuralPartialEq for PatchedBulkTokenRequest
Auto Trait Implementations§
impl Freeze for PatchedBulkTokenRequest
impl RefUnwindSafe for PatchedBulkTokenRequest
impl Send for PatchedBulkTokenRequest
impl Sync for PatchedBulkTokenRequest
impl Unpin for PatchedBulkTokenRequest
impl UnsafeUnpin for PatchedBulkTokenRequest
impl UnwindSafe for PatchedBulkTokenRequest
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