pub enum NomCode {
Bacterial,
Botanical,
Cultivars,
Phyto,
Virus,
Zoological,
Phylo,
}Expand description
Java org.gbif.nameparser.api.NomCode. Nomenclatural codes governing biological taxonomic
nomenclature.
Hash (beyond the Rank-parity Debug, Clone, Copy, PartialEq, Eq, Serialize set) lets a
NomCode key a set or map, as Rank does for its own static tables above.
Variants§
Implementations§
Source§impl NomCode
impl NomCode
Sourcepub fn from_name(name: &str) -> Option<NomCode>
pub fn from_name(name: &str) -> Option<NomCode>
Looks up a variant by its serialized SCREAMING_SNAKE name (Java NomCode.name()).
A hand-written match, unlike Rank::from_name, since NomCode has no ALL-style
constant to reverse-search over — but each arm’s string literal is exactly this type’s
own #[serde(rename_all = "SCREAMING_SNAKE_CASE")] output for that variant, pinned
against the real Serialize impl by
nomcode_from_name_round_trips_every_variant_via_its_own_serialize_impl below, so the
two representations cannot silently drift apart. Returns None for an unrecognized
name, same rationale as Rank::from_name.