Enum musicbrainz_rs::entity::area::AreaType
source · #[non_exhaustive]
pub enum AreaType {
Country,
Subdivision,
City,
Municipality,
District,
Island,
County,
MilitaryBase,
IndigenousTerritoryReserve,
UnrecognizedAreaType,
}
Expand description
The type of a MusicBrainz area entity.
Note that this enum is non_exhaustive
; The list of area types is subject to change and these
changes are only reflected in the DB, not in actual MB code.
Variants are derived from the area_type
table in the MusicBrainz database.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Country
Country is used for areas included (or previously included) in ISO 3166-1, e.g. United States.
Subdivision
Subdivision is used for the main administrative divisions of a country, e.g. California, Ontario, Okinawa. These are considered when displaying the parent areas for a given area.
City
City is used for settlements of any size, including towns and villages.
Municipality
Municipality is used for small administrative divisions which, for urban municipalities, often contain a single city and a few surrounding villages. Rural municipalities typically group several villages together.
District
District is used for a division of a large city, e.g. Queens.
Island
Island is used for islands and atolls which don’t form subdivisions of their own, e.g. Skye. These are not considered when displaying the parent areas for a given area.
County
County is used for smaller administrative divisions of a country which are not the main administrative divisions but are also not municipalities, e.g. counties in the USA. These are not considered when displaying the parent areas for a given area.
MilitaryBase
Used for any military bases that are large enough to be considered an area, not just a place.
IndigenousTerritoryReserve
Used for semi-autonomous territories governed by indigenous peoples, such as Indian reserves/reservations in North America and indigenous territories in Central and South America.
UnrecognizedAreaType
Any area_type that does not yet have a corresponding variant in this enum.
If you ever see a AreaType::UnrecognizedAreaType
in the wild, let us know and file an issue/pull request!
Trait Implementations§
source§impl<'de> Deserialize<'de> for AreaType
impl<'de> Deserialize<'de> for AreaType
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>,
source§impl PartialEq<AreaType> for AreaType
impl PartialEq<AreaType> for AreaType
impl Eq for AreaType
impl StructuralEq for AreaType
impl StructuralPartialEq for AreaType
Auto Trait Implementations§
impl RefUnwindSafe for AreaType
impl Send for AreaType
impl Sync for AreaType
impl Unpin for AreaType
impl UnwindSafe for AreaType
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
key
and return true
if they are equal.