#[non_exhaustive]pub enum ShapeType {
State,
County,
Msa,
Country,
Bea,
Other(String),
}Expand description
The kind of geographic boundary set to fetch from GeoFRED / Maps (the
shape parameter of geofred/shapes/file) — which regions’ polygons the
returned ShapeFile covers.
Carried on the wire as a lowercase token (e.g. "bea"). Tokens this version
does not name round-trip verbatim through ShapeType::Other rather than
failing (ADR-0005), and the enum is #[non_exhaustive] so new variants can
be promoted out of Other later without breaking callers’ match arms.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
State
U.S. state boundaries.
County
U.S. county boundaries.
Msa
Metropolitan Statistical Area boundaries.
Country
Country boundaries.
Bea
Bureau of Economic Analysis region boundaries.
Other(String)
A shape type FRED accepts that this version does not name; holds the raw token verbatim.
Implementations§
Source§impl ShapeType
impl ShapeType
Sourcepub fn query_code(&self) -> &str
pub fn query_code(&self) -> &str
The GeoFRED query token for this shape (the shape parameter): state,
county, msa, country, bea. For ShapeType::Other this returns
the raw token.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ShapeType
impl<'de> Deserialize<'de> for ShapeType
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>,
impl Eq for ShapeType
Source§impl Serialize for ShapeType
impl Serialize for ShapeType
Source§fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
Serializes as the GeoFRED token — symmetric with Deserialize.