pub struct TagRequest {
pub name: String,
pub slug: String,
pub color: Option<String>,
pub description: Option<String>,
pub weight: Option<i32>,
pub object_types: Option<Vec<String>>,
}Expand description
TagRequest : 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§
§name: String§slug: String§color: Option<String>§description: Option<String>§weight: Option<i32>§object_types: Option<Vec<String>>Implementations§
Source§impl TagRequest
impl TagRequest
Sourcepub fn new(name: String, slug: String) -> TagRequest
pub fn new(name: String, slug: String) -> TagRequest
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 TagRequest
impl Clone for TagRequest
Source§fn clone(&self) -> TagRequest
fn clone(&self) -> TagRequest
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 TagRequest
impl Debug for TagRequest
Source§impl Default for TagRequest
impl Default for TagRequest
Source§fn default() -> TagRequest
fn default() -> TagRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TagRequest
impl<'de> Deserialize<'de> for TagRequest
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 TagRequest
impl PartialEq for TagRequest
Source§impl Serialize for TagRequest
impl Serialize for TagRequest
impl StructuralPartialEq for TagRequest
Auto Trait Implementations§
impl Freeze for TagRequest
impl RefUnwindSafe for TagRequest
impl Send for TagRequest
impl Sync for TagRequest
impl Unpin for TagRequest
impl UnwindSafe for TagRequest
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