pub struct CustomFieldChoiceSetRequest {
pub name: String,
pub description: Option<String>,
pub base_choices: Option<BaseChoices>,
pub extra_choices: Vec<Vec<Value>>,
pub order_alphabetically: Option<bool>,
}Expand description
CustomFieldChoiceSetRequest : 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: String§description: Option<String>§base_choices: Option<BaseChoices>IATA- IATA (Airport codes) *ISO_3166- ISO 3166 (Country codes) *UN_LOCODE- UN/LOCODE (Location codes)
extra_choices: Vec<Vec<Value>>§order_alphabetically: Option<bool>Choices are automatically ordered alphabetically
Implementations§
Source§impl CustomFieldChoiceSetRequest
impl CustomFieldChoiceSetRequest
Sourcepub fn new(
name: String,
extra_choices: Vec<Vec<Value>>,
) -> CustomFieldChoiceSetRequest
pub fn new( name: String, extra_choices: Vec<Vec<Value>>, ) -> CustomFieldChoiceSetRequest
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 CustomFieldChoiceSetRequest
impl Clone for CustomFieldChoiceSetRequest
Source§fn clone(&self) -> CustomFieldChoiceSetRequest
fn clone(&self) -> CustomFieldChoiceSetRequest
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 CustomFieldChoiceSetRequest
impl Debug for CustomFieldChoiceSetRequest
Source§impl Default for CustomFieldChoiceSetRequest
impl Default for CustomFieldChoiceSetRequest
Source§fn default() -> CustomFieldChoiceSetRequest
fn default() -> CustomFieldChoiceSetRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CustomFieldChoiceSetRequest
impl<'de> Deserialize<'de> for CustomFieldChoiceSetRequest
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 CustomFieldChoiceSetRequest
Auto Trait Implementations§
impl Freeze for CustomFieldChoiceSetRequest
impl RefUnwindSafe for CustomFieldChoiceSetRequest
impl Send for CustomFieldChoiceSetRequest
impl Sync for CustomFieldChoiceSetRequest
impl Unpin for CustomFieldChoiceSetRequest
impl UnwindSafe for CustomFieldChoiceSetRequest
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