#[non_exhaustive]pub struct ReverseGeocodeResultItem {Show 15 fields
pub place_id: String,
pub place_type: PlaceType,
pub title: String,
pub address: Option<Address>,
pub address_number_corrected: Option<bool>,
pub postal_code_details: Option<Vec<PostalCodeDetails>>,
pub position: Option<Vec<f64>>,
pub distance: i64,
pub map_view: Option<Vec<f64>>,
pub categories: Option<Vec<Category>>,
pub food_types: Option<Vec<FoodType>>,
pub access_points: Option<Vec<AccessPoint>>,
pub time_zone: Option<TimeZone>,
pub political_view: Option<String>,
pub intersections: Option<Vec<Intersection>>,
}
Expand description
The returned location from the Reverse Geocode
action.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.place_id: String
The PlaceId
of the place you wish to receive the information for.
place_type: PlaceType
A PlaceType
is a category that the result place must belong to.
title: String
The localized display name of this result item based on request parameter language
.
address: Option<Address>
The place's address.
address_number_corrected: Option<bool>
Boolean indicating if the address provided has been corrected.
postal_code_details: Option<Vec<PostalCodeDetails>>
Contains details about the postal code of the place/result.
position: Option<Vec<f64>>
The position in longitude and latitude.
distance: i64
The distance in meters from the QueryPosition.
map_view: Option<Vec<f64>>
The bounding box enclosing the geometric shape (area or line) that an individual result covers.
The bounding box formed is defined as a set 4 coordinates: \[{westward lng}, {southern lat}, {eastward lng}, {northern lat}\]
categories: Option<Vec<Category>>
Categories of results that results must belong to.
food_types: Option<Vec<FoodType>>
List of food types offered by this result.
access_points: Option<Vec<AccessPoint>>
Position of the access point represented by longitude and latitude.
time_zone: Option<TimeZone>
The time zone in which the place is located.
political_view: Option<String>
The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.
intersections: Option<Vec<Intersection>>
All Intersections that are near the provided address.
Implementations§
Source§impl ReverseGeocodeResultItem
impl ReverseGeocodeResultItem
Sourcepub fn place_id(&self) -> &str
pub fn place_id(&self) -> &str
The PlaceId
of the place you wish to receive the information for.
Sourcepub fn place_type(&self) -> &PlaceType
pub fn place_type(&self) -> &PlaceType
A PlaceType
is a category that the result place must belong to.
Sourcepub fn title(&self) -> &str
pub fn title(&self) -> &str
The localized display name of this result item based on request parameter language
.
Sourcepub fn address_number_corrected(&self) -> Option<bool>
pub fn address_number_corrected(&self) -> Option<bool>
Boolean indicating if the address provided has been corrected.
Sourcepub fn postal_code_details(&self) -> &[PostalCodeDetails]
pub fn postal_code_details(&self) -> &[PostalCodeDetails]
Contains details about the postal code of the place/result.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .postal_code_details.is_none()
.
Sourcepub fn position(&self) -> &[f64]
pub fn position(&self) -> &[f64]
The position in longitude and latitude.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .position.is_none()
.
Sourcepub fn map_view(&self) -> &[f64]
pub fn map_view(&self) -> &[f64]
The bounding box enclosing the geometric shape (area or line) that an individual result covers.
The bounding box formed is defined as a set 4 coordinates: \[{westward lng}, {southern lat}, {eastward lng}, {northern lat}\]
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .map_view.is_none()
.
Sourcepub fn categories(&self) -> &[Category]
pub fn categories(&self) -> &[Category]
Categories of results that results must belong to.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .categories.is_none()
.
Sourcepub fn food_types(&self) -> &[FoodType]
pub fn food_types(&self) -> &[FoodType]
List of food types offered by this result.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .food_types.is_none()
.
Sourcepub fn access_points(&self) -> &[AccessPoint]
pub fn access_points(&self) -> &[AccessPoint]
Position of the access point represented by longitude and latitude.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .access_points.is_none()
.
Sourcepub fn political_view(&self) -> Option<&str>
pub fn political_view(&self) -> Option<&str>
The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.
Sourcepub fn intersections(&self) -> &[Intersection]
pub fn intersections(&self) -> &[Intersection]
All Intersections that are near the provided address.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .intersections.is_none()
.
Source§impl ReverseGeocodeResultItem
impl ReverseGeocodeResultItem
Sourcepub fn builder() -> ReverseGeocodeResultItemBuilder
pub fn builder() -> ReverseGeocodeResultItemBuilder
Creates a new builder-style object to manufacture ReverseGeocodeResultItem
.
Trait Implementations§
Source§impl Clone for ReverseGeocodeResultItem
impl Clone for ReverseGeocodeResultItem
Source§fn clone(&self) -> ReverseGeocodeResultItem
fn clone(&self) -> ReverseGeocodeResultItem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ReverseGeocodeResultItem
impl Debug for ReverseGeocodeResultItem
Source§impl PartialEq for ReverseGeocodeResultItem
impl PartialEq for ReverseGeocodeResultItem
impl StructuralPartialEq for ReverseGeocodeResultItem
Auto Trait Implementations§
impl Freeze for ReverseGeocodeResultItem
impl RefUnwindSafe for ReverseGeocodeResultItem
impl Send for ReverseGeocodeResultItem
impl Sync for ReverseGeocodeResultItem
impl Unpin for ReverseGeocodeResultItem
impl UnwindSafe for ReverseGeocodeResultItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);