Struct actix_web_location::Location [−][src]
pub struct Location {
pub country: Option<String>,
pub region: Option<String>,
pub city: Option<String>,
pub dma: Option<u16>,
pub provider: String,
}Expand description
The location information that providers must produce.
Fields
country: Option<String>Country in ISO 3166-1 alpha-2 format, such as “MX” for Mexico or “IT” for Italy.
region: Option<String>Region/region (e.g. a US state) in ISO 3166-2 format, such as “QC” for Quebec (with country = “CA”) or “TX” for Texas (with country = “US”).
city: Option<String>City, listed by name such as “Portland” or “Berlin”.
dma: Option<u16>The Designated Market Area code, as defined by Nielsen. Only defined in the US.
provider: StringThe name of the provider that produced this recommendation.
Implementations
Create a builder for a Location that can be assembled incrementally.
Get an owned copy of the country, or the default if the field is None
Get an owned copy of the region, or the default if the field is None
Trait Implementations
type Config = LocationConfig
type Config = LocationConfig
Configuration for this extractor
Convert request to a Self
Convert request to a Self Read more
Auto Trait Implementations
impl RefUnwindSafe for Location
impl UnwindSafe for Location
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self