pub enum EthnicityPreference {
OpenToAll,
AmericanIndian,
BlackAfrican,
EastAsian,
Hispanic,
MiddleEastern,
PacificIslander,
SouthAsian,
White,
Other,
}Variants§
OpenToAll
AmericanIndian
BlackAfrican
EastAsian
Hispanic
MiddleEastern
PacificIslander
SouthAsian
White
Other
Implementations§
Source§impl EthnicityPreference
impl EthnicityPreference
Sourcepub fn to_value(&self) -> Option<EthnicityValue>
pub fn to_value(&self) -> Option<EthnicityValue>
Returns the base value for this preference option, if one exists.
Sourcepub fn from_value(value: EthnicityValue) -> Self
pub fn from_value(value: EthnicityValue) -> Self
Construct a preference value from a shared base value.
Sourcepub fn into_profile(self) -> Option<EthnicityProfile>
pub fn into_profile(self) -> Option<EthnicityProfile>
Convert this preference value into a profile variant when possible.
Trait Implementations§
Source§impl ApiEnum for EthnicityPreference
impl ApiEnum for EthnicityPreference
fn to_api_value(&self) -> i8
fn from_string(s: &str) -> Option<Self>
Source§impl Clone for EthnicityPreference
impl Clone for EthnicityPreference
Source§fn clone(&self) -> EthnicityPreference
fn clone(&self) -> EthnicityPreference
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 EthnicityPreference
impl Debug for EthnicityPreference
Source§impl<'de> Deserialize<'de> for EthnicityPreference
impl<'de> Deserialize<'de> for EthnicityPreference
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 From<EthnicityValue> for EthnicityPreference
impl From<EthnicityValue> for EthnicityPreference
Source§fn from(value: EthnicityValue) -> Self
fn from(value: EthnicityValue) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for EthnicityPreference
impl JsonSchema for EthnicityPreference
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for EthnicityPreference
impl PartialEq for EthnicityPreference
Source§impl Serialize for EthnicityPreference
impl Serialize for EthnicityPreference
impl StructuralPartialEq for EthnicityPreference
Auto Trait Implementations§
impl Freeze for EthnicityPreference
impl RefUnwindSafe for EthnicityPreference
impl Send for EthnicityPreference
impl Sync for EthnicityPreference
impl Unpin for EthnicityPreference
impl UnsafeUnpin for EthnicityPreference
impl UnwindSafe for EthnicityPreference
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