pub struct PatchedObjectPermissionRequest {
pub name: Option<String>,
pub description: Option<String>,
pub enabled: Option<bool>,
pub object_types: Option<Vec<String>>,
pub actions: Option<Vec<String>>,
pub constraints: Option<Option<Value>>,
pub groups: Option<Vec<i32>>,
pub users: Option<Vec<i32>>,
}Expand description
PatchedObjectPermissionRequest : 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§
§name: Option<String>§description: Option<String>§enabled: Option<bool>§object_types: Option<Vec<String>>§actions: Option<Vec<String>>The list of actions granted by this permission
constraints: Option<Option<Value>>Queryset filter matching the applicable objects of the selected type(s)
groups: Option<Vec<i32>>§users: Option<Vec<i32>>Implementations§
Source§impl PatchedObjectPermissionRequest
impl PatchedObjectPermissionRequest
Sourcepub fn new() -> PatchedObjectPermissionRequest
pub fn new() -> PatchedObjectPermissionRequest
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 PatchedObjectPermissionRequest
impl Clone for PatchedObjectPermissionRequest
Source§fn clone(&self) -> PatchedObjectPermissionRequest
fn clone(&self) -> PatchedObjectPermissionRequest
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 PatchedObjectPermissionRequest
impl Default for PatchedObjectPermissionRequest
Source§fn default() -> PatchedObjectPermissionRequest
fn default() -> PatchedObjectPermissionRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PatchedObjectPermissionRequest
impl<'de> Deserialize<'de> for PatchedObjectPermissionRequest
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 PatchedObjectPermissionRequest
impl PartialEq for PatchedObjectPermissionRequest
Source§fn eq(&self, other: &PatchedObjectPermissionRequest) -> bool
fn eq(&self, other: &PatchedObjectPermissionRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PatchedObjectPermissionRequest
Auto Trait Implementations§
impl Freeze for PatchedObjectPermissionRequest
impl RefUnwindSafe for PatchedObjectPermissionRequest
impl Send for PatchedObjectPermissionRequest
impl Sync for PatchedObjectPermissionRequest
impl Unpin for PatchedObjectPermissionRequest
impl UnwindSafe for PatchedObjectPermissionRequest
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