pub struct WritableCustomFieldChoiceSetRequest {
pub name: String,
pub description: Option<String>,
pub base_choices: Option<Option<BaseChoices>>,
pub extra_choices: Vec<Vec<Value>>,
pub order_alphabetically: Option<bool>,
}Expand description
WritableCustomFieldChoiceSetRequest : 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<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: Vec<Vec<Value>>§order_alphabetically: Option<bool>Choices are automatically ordered alphabetically
Implementations§
Source§impl WritableCustomFieldChoiceSetRequest
impl WritableCustomFieldChoiceSetRequest
Sourcepub fn new(
name: String,
extra_choices: Vec<Vec<Value>>,
) -> WritableCustomFieldChoiceSetRequest
pub fn new( name: String, extra_choices: Vec<Vec<Value>>, ) -> WritableCustomFieldChoiceSetRequest
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 WritableCustomFieldChoiceSetRequest
impl Clone for WritableCustomFieldChoiceSetRequest
Source§fn clone(&self) -> WritableCustomFieldChoiceSetRequest
fn clone(&self) -> WritableCustomFieldChoiceSetRequest
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 WritableCustomFieldChoiceSetRequest
impl Default for WritableCustomFieldChoiceSetRequest
Source§fn default() -> WritableCustomFieldChoiceSetRequest
fn default() -> WritableCustomFieldChoiceSetRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WritableCustomFieldChoiceSetRequest
impl<'de> Deserialize<'de> for WritableCustomFieldChoiceSetRequest
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 WritableCustomFieldChoiceSetRequest
impl PartialEq for WritableCustomFieldChoiceSetRequest
Source§fn eq(&self, other: &WritableCustomFieldChoiceSetRequest) -> bool
fn eq(&self, other: &WritableCustomFieldChoiceSetRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WritableCustomFieldChoiceSetRequest
Auto Trait Implementations§
impl Freeze for WritableCustomFieldChoiceSetRequest
impl RefUnwindSafe for WritableCustomFieldChoiceSetRequest
impl Send for WritableCustomFieldChoiceSetRequest
impl Sync for WritableCustomFieldChoiceSetRequest
impl Unpin for WritableCustomFieldChoiceSetRequest
impl UnwindSafe for WritableCustomFieldChoiceSetRequest
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