pub struct Owner {
pub id: Option<i32>,
pub url: Option<String>,
pub display_url: Option<String>,
pub display: Option<String>,
pub name: String,
pub group: Option<Box<BriefOwnerGroup>>,
pub description: Option<String>,
pub user_groups: Option<Vec<Group>>,
pub users: Option<Vec<User>>,
}Expand description
Owner : 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_url: Option<String>§display: Option<String>§name: String§group: Option<Box<BriefOwnerGroup>>§description: Option<String>§user_groups: Option<Vec<Group>>§users: Option<Vec<User>>Implementations§
Source§impl Owner
impl Owner
Sourcepub fn new(name: String, group: Option<BriefOwnerGroup>) -> Owner
pub fn new(name: String, group: Option<BriefOwnerGroup>) -> Owner
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 Owner
impl<'de> Deserialize<'de> for Owner
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 Owner
Auto Trait Implementations§
impl Freeze for Owner
impl RefUnwindSafe for Owner
impl Send for Owner
impl Sync for Owner
impl Unpin for Owner
impl UnsafeUnpin for Owner
impl UnwindSafe for Owner
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