#[non_exhaustive]pub struct GeocodeParsedQueryAddressComponents {Show 13 fields
pub country: Option<Vec<ParsedQueryComponent>>,
pub region: Option<Vec<ParsedQueryComponent>>,
pub sub_region: Option<Vec<ParsedQueryComponent>>,
pub locality: Option<Vec<ParsedQueryComponent>>,
pub district: Option<Vec<ParsedQueryComponent>>,
pub sub_district: Option<Vec<ParsedQueryComponent>>,
pub postal_code: Option<Vec<ParsedQueryComponent>>,
pub block: Option<Vec<ParsedQueryComponent>>,
pub sub_block: Option<Vec<ParsedQueryComponent>>,
pub street: Option<Vec<ParsedQueryComponent>>,
pub address_number: Option<Vec<ParsedQueryComponent>>,
pub building: Option<Vec<ParsedQueryComponent>>,
pub secondary_address_components: Option<Vec<ParsedQuerySecondaryAddressComponent>>,
}
Expand description
Parsed address components in the provided QueryText.
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.country: Option<Vec<ParsedQueryComponent>>
The alpha-2 or alpha-3 character code for the country that the results will be present in.
region: Option<Vec<ParsedQueryComponent>>
The region or state results should be present in.
Example: North Rhine-Westphalia
.
sub_region: Option<Vec<ParsedQueryComponent>>
The sub-region or county for which results should be present in.
locality: Option<Vec<ParsedQueryComponent>>
The city or locality of the address.
Example: Vancouver
.
district: Option<Vec<ParsedQueryComponent>>
The district or division of a city the results should be present in.
sub_district: Option<Vec<ParsedQueryComponent>>
A subdivision of a district.
Example: Minden-Lübbecke
.
postal_code: Option<Vec<ParsedQueryComponent>>
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code, for which the result should possess.
block: Option<Vec<ParsedQueryComponent>>
Name of the block.
Example: Sunny Mansion 203 block: 2 Chome
sub_block: Option<Vec<ParsedQueryComponent>>
Name of sub-block.
Example: Sunny Mansion 203 sub-block: 4
street: Option<Vec<ParsedQueryComponent>>
The name of the street results should be present in.
address_number: Option<Vec<ParsedQueryComponent>>
The number that identifies an address within a street.
building: Option<Vec<ParsedQueryComponent>>
The name of the building at the address.
secondary_address_components: Option<Vec<ParsedQuerySecondaryAddressComponent>>
Parsed secondary address components from the provided query text.
Implementations§
Source§impl GeocodeParsedQueryAddressComponents
impl GeocodeParsedQueryAddressComponents
Sourcepub fn country(&self) -> &[ParsedQueryComponent]
pub fn country(&self) -> &[ParsedQueryComponent]
The alpha-2 or alpha-3 character code for the country that the results will be present in.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .country.is_none()
.
Sourcepub fn region(&self) -> &[ParsedQueryComponent]
pub fn region(&self) -> &[ParsedQueryComponent]
The region or state results should be present in.
Example: North Rhine-Westphalia
.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .region.is_none()
.
Sourcepub fn sub_region(&self) -> &[ParsedQueryComponent]
pub fn sub_region(&self) -> &[ParsedQueryComponent]
The sub-region or county for which results should be present in.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .sub_region.is_none()
.
Sourcepub fn locality(&self) -> &[ParsedQueryComponent]
pub fn locality(&self) -> &[ParsedQueryComponent]
The city or locality of the address.
Example: Vancouver
.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .locality.is_none()
.
Sourcepub fn district(&self) -> &[ParsedQueryComponent]
pub fn district(&self) -> &[ParsedQueryComponent]
The district or division of a city the results should be present in.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .district.is_none()
.
Sourcepub fn sub_district(&self) -> &[ParsedQueryComponent]
pub fn sub_district(&self) -> &[ParsedQueryComponent]
A subdivision of a district.
Example: Minden-Lübbecke
.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .sub_district.is_none()
.
Sourcepub fn postal_code(&self) -> &[ParsedQueryComponent]
pub fn postal_code(&self) -> &[ParsedQueryComponent]
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code, for which the result should possess.
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.is_none()
.
Sourcepub fn block(&self) -> &[ParsedQueryComponent]
pub fn block(&self) -> &[ParsedQueryComponent]
Name of the block.
Example: Sunny Mansion 203 block: 2 Chome
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .block.is_none()
.
Sourcepub fn sub_block(&self) -> &[ParsedQueryComponent]
pub fn sub_block(&self) -> &[ParsedQueryComponent]
Name of sub-block.
Example: Sunny Mansion 203 sub-block: 4
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .sub_block.is_none()
.
Sourcepub fn street(&self) -> &[ParsedQueryComponent]
pub fn street(&self) -> &[ParsedQueryComponent]
The name of the street results should be present in.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .street.is_none()
.
Sourcepub fn address_number(&self) -> &[ParsedQueryComponent]
pub fn address_number(&self) -> &[ParsedQueryComponent]
The number that identifies an address within a street.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .address_number.is_none()
.
Sourcepub fn building(&self) -> &[ParsedQueryComponent]
pub fn building(&self) -> &[ParsedQueryComponent]
The name of the building at the 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 .building.is_none()
.
Sourcepub fn secondary_address_components(
&self,
) -> &[ParsedQuerySecondaryAddressComponent]
pub fn secondary_address_components( &self, ) -> &[ParsedQuerySecondaryAddressComponent]
Parsed secondary address components from the provided query text.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .secondary_address_components.is_none()
.
Source§impl GeocodeParsedQueryAddressComponents
impl GeocodeParsedQueryAddressComponents
Sourcepub fn builder() -> GeocodeParsedQueryAddressComponentsBuilder
pub fn builder() -> GeocodeParsedQueryAddressComponentsBuilder
Creates a new builder-style object to manufacture GeocodeParsedQueryAddressComponents
.
Trait Implementations§
Source§impl Clone for GeocodeParsedQueryAddressComponents
impl Clone for GeocodeParsedQueryAddressComponents
Source§fn clone(&self) -> GeocodeParsedQueryAddressComponents
fn clone(&self) -> GeocodeParsedQueryAddressComponents
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl PartialEq for GeocodeParsedQueryAddressComponents
impl PartialEq for GeocodeParsedQueryAddressComponents
Source§fn eq(&self, other: &GeocodeParsedQueryAddressComponents) -> bool
fn eq(&self, other: &GeocodeParsedQueryAddressComponents) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for GeocodeParsedQueryAddressComponents
Auto Trait Implementations§
impl Freeze for GeocodeParsedQueryAddressComponents
impl RefUnwindSafe for GeocodeParsedQueryAddressComponents
impl Send for GeocodeParsedQueryAddressComponents
impl Sync for GeocodeParsedQueryAddressComponents
impl Unpin for GeocodeParsedQueryAddressComponents
impl UnwindSafe for GeocodeParsedQueryAddressComponents
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);