pub struct MetadataChoiceRequest {
pub id: Option<Uuid>,
pub value: String,
pub weight: Option<i32>,
pub metadata_type: Box<ApprovalWorkflowStageResponseApprovalWorkflowStage>,
}Expand description
MetadataChoiceRequest : 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<Uuid>§value: String§weight: Option<i32>Higher weights appear later in the list
metadata_type: Box<ApprovalWorkflowStageResponseApprovalWorkflowStage>Implementations§
Source§impl MetadataChoiceRequest
impl MetadataChoiceRequest
Sourcepub fn new(
value: String,
metadata_type: ApprovalWorkflowStageResponseApprovalWorkflowStage,
) -> MetadataChoiceRequest
pub fn new( value: String, metadata_type: ApprovalWorkflowStageResponseApprovalWorkflowStage, ) -> MetadataChoiceRequest
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 MetadataChoiceRequest
impl Clone for MetadataChoiceRequest
Source§fn clone(&self) -> MetadataChoiceRequest
fn clone(&self) -> MetadataChoiceRequest
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 MetadataChoiceRequest
impl Debug for MetadataChoiceRequest
Source§impl Default for MetadataChoiceRequest
impl Default for MetadataChoiceRequest
Source§fn default() -> MetadataChoiceRequest
fn default() -> MetadataChoiceRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MetadataChoiceRequest
impl<'de> Deserialize<'de> for MetadataChoiceRequest
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 MetadataChoiceRequest
impl PartialEq for MetadataChoiceRequest
Source§impl Serialize for MetadataChoiceRequest
impl Serialize for MetadataChoiceRequest
impl StructuralPartialEq for MetadataChoiceRequest
Auto Trait Implementations§
impl Freeze for MetadataChoiceRequest
impl RefUnwindSafe for MetadataChoiceRequest
impl Send for MetadataChoiceRequest
impl Sync for MetadataChoiceRequest
impl Unpin for MetadataChoiceRequest
impl UnsafeUnpin for MetadataChoiceRequest
impl UnwindSafe for MetadataChoiceRequest
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