Enum musicbrainz_rs::entity::artist::Gender
source · #[non_exhaustive]
pub enum Gender {
Male,
Female,
Other,
NotApplicable,
UnrecognizedGender,
}
Expand description
The gender is used to explicitly state whether a person or character identifies as male,
female or neither. Groups do not have genders.
The type of a MusicBrainz gender entity.
Note that this enum is non_exhaustive
; The list of gender types is subject to change and these
changes are only reflected in the DB, not in actual MB code.
Variants are derived from the gender
table in the MusicBrainz database.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Male
Female
Other
NotApplicable
For cases where gender just doesn’t apply at all (like companies entered as artists).
UnrecognizedGender
Any gender that does not yet have a corresponding variant in this enum.
If you ever see a Gender::UnrecognizedGender
in the wild, let us know and file an issue/pull request!
Trait Implementations§
source§impl<'de> Deserialize<'de> for Gender
impl<'de> Deserialize<'de> for Gender
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<Gender> for Gender
impl PartialEq<Gender> for Gender
impl Eq for Gender
impl StructuralEq for Gender
impl StructuralPartialEq for Gender
Auto Trait Implementations§
impl RefUnwindSafe for Gender
impl Send for Gender
impl Sync for Gender
impl Unpin for Gender
impl UnwindSafe for Gender
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.