pub struct Bookmark {
pub id: Option<i32>,
pub url: Option<String>,
pub display: Option<String>,
pub object_type: String,
pub object_id: i64,
pub object: Option<Option<Value>>,
pub user: Box<BriefUser>,
pub created: Option<String>,
}Expand description
Bookmark : 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§object: Option<Option<Value>>§user: Box<BriefUser>§created: Option<String>Implementations§
Source§impl Bookmark
impl Bookmark
Sourcepub fn new(object_type: String, object_id: i64, user: BriefUser) -> Bookmark
pub fn new(object_type: String, object_id: i64, user: BriefUser) -> Bookmark
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<'de> Deserialize<'de> for Bookmark
impl<'de> Deserialize<'de> for Bookmark
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 Bookmark
Auto Trait Implementations§
impl Freeze for Bookmark
impl RefUnwindSafe for Bookmark
impl Send for Bookmark
impl Sync for Bookmark
impl Unpin for Bookmark
impl UnwindSafe for Bookmark
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