#[non_exhaustive]pub struct SearchTextResultItem {Show 18 fields
pub place_id: String,
pub place_type: PlaceType,
pub title: String,
pub address: Option<Address>,
pub address_number_corrected: Option<bool>,
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 business_chains: Option<Vec<BusinessChain>>,
pub contacts: Option<Contacts>,
pub opening_hours: Option<Vec<OpeningHours>>,
pub access_points: Option<Vec<AccessPoint>>,
pub access_restrictions: Option<Vec<AccessRestriction>>,
pub time_zone: Option<TimeZone>,
pub political_view: Option<String>,
pub phonemes: Option<PhonemeDetails>,
}
Expand description
The text search result.
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 item's title.
address: Option<Address>
The place's address.
address_number_corrected: Option<bool>
Boolean indicating if the address provided has been corrected.
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.
business_chains: Option<Vec<BusinessChain>>
The Business Chains associated with the place.
contacts: Option<Contacts>
List of potential contact methods for the result/place.
opening_hours: Option<Vec<OpeningHours>>
List of opening hours objects.
access_points: Option<Vec<AccessPoint>>
Position of the access point represent by longitude and latitude.
access_restrictions: Option<Vec<AccessRestriction>>
Indicates known access restrictions on a vehicle access point. The index correlates to an access point and indicates if access through this point has some form of restriction.
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.
phonemes: Option<PhonemeDetails>
How the various components of the result's address are pronounced in various languages.
Implementations§
Source§impl SearchTextResultItem
impl SearchTextResultItem
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 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 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 business_chains(&self) -> &[BusinessChain]
pub fn business_chains(&self) -> &[BusinessChain]
The Business Chains associated with the place.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .business_chains.is_none()
.
Sourcepub fn contacts(&self) -> Option<&Contacts>
pub fn contacts(&self) -> Option<&Contacts>
List of potential contact methods for the result/place.
Sourcepub fn opening_hours(&self) -> &[OpeningHours]
pub fn opening_hours(&self) -> &[OpeningHours]
List of opening hours objects.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .opening_hours.is_none()
.
Sourcepub fn access_points(&self) -> &[AccessPoint]
pub fn access_points(&self) -> &[AccessPoint]
Position of the access point represent 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 access_restrictions(&self) -> &[AccessRestriction]
pub fn access_restrictions(&self) -> &[AccessRestriction]
Indicates known access restrictions on a vehicle access point. The index correlates to an access point and indicates if access through this point has some form of restriction.
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_restrictions.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 phonemes(&self) -> Option<&PhonemeDetails>
pub fn phonemes(&self) -> Option<&PhonemeDetails>
How the various components of the result's address are pronounced in various languages.
Source§impl SearchTextResultItem
impl SearchTextResultItem
Sourcepub fn builder() -> SearchTextResultItemBuilder
pub fn builder() -> SearchTextResultItemBuilder
Creates a new builder-style object to manufacture SearchTextResultItem
.
Trait Implementations§
Source§impl Clone for SearchTextResultItem
impl Clone for SearchTextResultItem
Source§fn clone(&self) -> SearchTextResultItem
fn clone(&self) -> SearchTextResultItem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SearchTextResultItem
impl Debug for SearchTextResultItem
Source§impl PartialEq for SearchTextResultItem
impl PartialEq for SearchTextResultItem
impl StructuralPartialEq for SearchTextResultItem
Auto Trait Implementations§
impl Freeze for SearchTextResultItem
impl RefUnwindSafe for SearchTextResultItem
impl Send for SearchTextResultItem
impl Sync for SearchTextResultItem
impl Unpin for SearchTextResultItem
impl UnwindSafe for SearchTextResultItem
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);