pub struct ImageAttachment {Show 13 fields
pub id: Option<i32>,
pub url: Option<String>,
pub display: Option<String>,
pub object_type: String,
pub object_id: i64,
pub parent: Option<Option<Value>>,
pub name: Option<String>,
pub image: String,
pub description: Option<String>,
pub image_height: Option<i32>,
pub image_width: Option<i32>,
pub created: Option<Option<String>>,
pub last_updated: Option<Option<String>>,
}Expand description
ImageAttachment : 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: Option<String>§object_type: String§object_id: i64§parent: Option<Option<Value>>§name: Option<String>§image: String§description: Option<String>§image_height: Option<i32>§image_width: Option<i32>§created: Option<Option<String>>§last_updated: Option<Option<String>>Implementations§
Source§impl ImageAttachment
impl ImageAttachment
Sourcepub fn new(
object_type: String,
object_id: i64,
image: String,
) -> ImageAttachment
pub fn new( object_type: String, object_id: i64, image: String, ) -> ImageAttachment
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 ImageAttachment
impl Clone for ImageAttachment
Source§fn clone(&self) -> ImageAttachment
fn clone(&self) -> ImageAttachment
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 ImageAttachment
impl Debug for ImageAttachment
Source§impl Default for ImageAttachment
impl Default for ImageAttachment
Source§fn default() -> ImageAttachment
fn default() -> ImageAttachment
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ImageAttachment
impl<'de> Deserialize<'de> for ImageAttachment
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 ImageAttachment
impl PartialEq for ImageAttachment
Source§impl Serialize for ImageAttachment
impl Serialize for ImageAttachment
impl StructuralPartialEq for ImageAttachment
Auto Trait Implementations§
impl Freeze for ImageAttachment
impl RefUnwindSafe for ImageAttachment
impl Send for ImageAttachment
impl Sync for ImageAttachment
impl Unpin for ImageAttachment
impl UnwindSafe for ImageAttachment
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