pub struct Geo { /* private fields */ }Expand description
Geo fields can carry data about a specific location related to an event.
This geolocation information can be derived from techniques such as Geo IP, or be user-supplied.
Implementations§
Source§impl Geo
impl Geo
Sourcepub fn get_location(&self) -> Option<&GeoPoint>
pub fn get_location(&self) -> Option<&GeoPoint>
Longitude and latitude.
Sourcepub fn set_location(&mut self, location_arg: GeoPoint)
pub fn set_location(&mut self, location_arg: GeoPoint)
Sourcepub fn get_continent_code(&self) -> Option<&String>
pub fn get_continent_code(&self) -> Option<&String>
Two-letter code representing continent’s name.
Sourcepub fn set_continent_code(&mut self, continent_code_arg: String)
pub fn set_continent_code(&mut self, continent_code_arg: String)
Sourcepub fn get_continent_name(&self) -> Option<&String>
pub fn get_continent_name(&self) -> Option<&String>
Name of the continent.
Sourcepub fn set_continent_name(&mut self, continent_name_arg: String)
pub fn set_continent_name(&mut self, continent_name_arg: String)
Sourcepub fn get_country_name(&self) -> Option<&String>
pub fn get_country_name(&self) -> Option<&String>
Country name.
Sourcepub fn set_country_name(&mut self, country_name_arg: String)
pub fn set_country_name(&mut self, country_name_arg: String)
Sourcepub fn get_region_name(&self) -> Option<&String>
pub fn get_region_name(&self) -> Option<&String>
Region name.
Sourcepub fn set_region_name(&mut self, region_name_arg: String)
pub fn set_region_name(&mut self, region_name_arg: String)
Sourcepub fn get_city_name(&self) -> Option<&String>
pub fn get_city_name(&self) -> Option<&String>
City name.
Sourcepub fn set_city_name(&mut self, city_name_arg: String)
pub fn set_city_name(&mut self, city_name_arg: String)
Sourcepub fn get_country_iso_code(&self) -> Option<&String>
pub fn get_country_iso_code(&self) -> Option<&String>
Country ISO code.
Sourcepub fn set_country_iso_code(&mut self, country_iso_code_arg: String)
pub fn set_country_iso_code(&mut self, country_iso_code_arg: String)
Sourcepub fn get_postal_code(&self) -> Option<&String>
pub fn get_postal_code(&self) -> Option<&String>
Postal code associated with the location.
Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
Sourcepub fn set_postal_code(&mut self, postal_code_arg: String)
pub fn set_postal_code(&mut self, postal_code_arg: String)
Postal code associated with the location.
Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
§Example
94040
Sourcepub fn get_region_iso_code(&self) -> Option<&String>
pub fn get_region_iso_code(&self) -> Option<&String>
Region ISO code.
Sourcepub fn set_region_iso_code(&mut self, region_iso_code_arg: String)
pub fn set_region_iso_code(&mut self, region_iso_code_arg: String)
Sourcepub fn get_timezone(&self) -> Option<&String>
pub fn get_timezone(&self) -> Option<&String>
The time zone of the location, such as IANA time zone name.
Sourcepub fn set_timezone(&mut self, timezone_arg: String)
pub fn set_timezone(&mut self, timezone_arg: String)
Sourcepub fn get_name(&self) -> Option<&String>
pub fn get_name(&self) -> Option<&String>
User-defined description of a location, at the level of granularity they care about.
Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
Not typically used in automated geolocation.
Sourcepub fn set_name(&mut self, name_arg: String)
pub fn set_name(&mut self, name_arg: String)
User-defined description of a location, at the level of granularity they care about.
Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
Not typically used in automated geolocation.
§Example
boston-dc