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