pub struct PatchedWritableCustomFieldChoiceSetRequest {
pub name: Option<String>,
pub description: Option<String>,
pub base_choices: Option<Option<BaseChoices>>,
pub extra_choices: Option<Vec<Vec<Value>>>,
pub order_alphabetically: Option<bool>,
}Expand description
PatchedWritableCustomFieldChoiceSetRequest : 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>§base_choices: Option<Option<BaseChoices>>Base set of predefined choices (optional) * IATA - IATA (Airport codes) * ISO_3166 - ISO 3166 (Country codes) * UN_LOCODE - UN/LOCODE (Location codes)
extra_choices: Option<Vec<Vec<Value>>>§order_alphabetically: Option<bool>Choices are automatically ordered alphabetically
Implementations§
Source§impl PatchedWritableCustomFieldChoiceSetRequest
impl PatchedWritableCustomFieldChoiceSetRequest
Sourcepub fn new() -> PatchedWritableCustomFieldChoiceSetRequest
pub fn new() -> PatchedWritableCustomFieldChoiceSetRequest
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 PatchedWritableCustomFieldChoiceSetRequest
impl Clone for PatchedWritableCustomFieldChoiceSetRequest
Source§fn clone(&self) -> PatchedWritableCustomFieldChoiceSetRequest
fn clone(&self) -> PatchedWritableCustomFieldChoiceSetRequest
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 PatchedWritableCustomFieldChoiceSetRequest
impl Default for PatchedWritableCustomFieldChoiceSetRequest
Source§fn default() -> PatchedWritableCustomFieldChoiceSetRequest
fn default() -> PatchedWritableCustomFieldChoiceSetRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PatchedWritableCustomFieldChoiceSetRequest
impl<'de> Deserialize<'de> for PatchedWritableCustomFieldChoiceSetRequest
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 PatchedWritableCustomFieldChoiceSetRequest
impl PartialEq for PatchedWritableCustomFieldChoiceSetRequest
Source§fn eq(&self, other: &PatchedWritableCustomFieldChoiceSetRequest) -> bool
fn eq(&self, other: &PatchedWritableCustomFieldChoiceSetRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PatchedWritableCustomFieldChoiceSetRequest
Auto Trait Implementations§
impl Freeze for PatchedWritableCustomFieldChoiceSetRequest
impl RefUnwindSafe for PatchedWritableCustomFieldChoiceSetRequest
impl Send for PatchedWritableCustomFieldChoiceSetRequest
impl Sync for PatchedWritableCustomFieldChoiceSetRequest
impl Unpin for PatchedWritableCustomFieldChoiceSetRequest
impl UnwindSafe for PatchedWritableCustomFieldChoiceSetRequest
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