pub struct PatchedImageAttachmentRequest {
pub object_type: Option<String>,
pub object_id: Option<i64>,
pub name: Option<String>,
pub image: Option<PathBuf>,
pub description: Option<String>,
}Expand description
PatchedImageAttachmentRequest : 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§
§object_type: Option<String>§object_id: Option<i64>§name: Option<String>§image: Option<PathBuf>§description: Option<String>Implementations§
Source§impl PatchedImageAttachmentRequest
impl PatchedImageAttachmentRequest
Sourcepub fn new() -> PatchedImageAttachmentRequest
pub fn new() -> PatchedImageAttachmentRequest
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 PatchedImageAttachmentRequest
impl Clone for PatchedImageAttachmentRequest
Source§fn clone(&self) -> PatchedImageAttachmentRequest
fn clone(&self) -> PatchedImageAttachmentRequest
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 Default for PatchedImageAttachmentRequest
impl Default for PatchedImageAttachmentRequest
Source§fn default() -> PatchedImageAttachmentRequest
fn default() -> PatchedImageAttachmentRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PatchedImageAttachmentRequest
impl<'de> Deserialize<'de> for PatchedImageAttachmentRequest
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 PatchedImageAttachmentRequest
impl PartialEq for PatchedImageAttachmentRequest
Source§fn eq(&self, other: &PatchedImageAttachmentRequest) -> bool
fn eq(&self, other: &PatchedImageAttachmentRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PatchedImageAttachmentRequest
Auto Trait Implementations§
impl Freeze for PatchedImageAttachmentRequest
impl RefUnwindSafe for PatchedImageAttachmentRequest
impl Send for PatchedImageAttachmentRequest
impl Sync for PatchedImageAttachmentRequest
impl Unpin for PatchedImageAttachmentRequest
impl UnwindSafe for PatchedImageAttachmentRequest
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