pub struct Token {Show 15 fields
pub id: Option<i32>,
pub url: Option<String>,
pub display_url: Option<String>,
pub display: Option<String>,
pub version: Option<i32>,
pub key: Option<Option<String>>,
pub user: Box<BriefUser>,
pub description: Option<String>,
pub created: 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
Token : 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: Option<i32>§url: Option<String>§display_url: Option<String>§display: Option<String>§version: Option<i32>1- v1 *2- v2
key: Option<Option<String>>v2 token identification key
user: Box<BriefUser>§description: Option<String>§created: 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§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Token
impl<'de> Deserialize<'de> for Token
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 Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin for Token
impl UnwindSafe for Token
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