#[non_exhaustive]pub struct LocationQuery {
pub place_filter: Option<PlaceFilter>,
pub kind: Option<Kind>,
/* private fields */
}Expand description
A location query to identify a nearby primary destination.
Note: if the location query is within a building that contains subpremises,
it is possible that the returned primary place is a subpremise. In these
cases, the containing_places field will include the building.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.place_filter: Option<PlaceFilter>Optional. Filters to apply to destination candidates.
kind: Option<Kind>The location query.
Implementations§
Source§impl LocationQuery
impl LocationQuery
Sourcepub fn set_place_filter<T>(self, v: T) -> Selfwhere
T: Into<PlaceFilter>,
pub fn set_place_filter<T>(self, v: T) -> Selfwhere
T: Into<PlaceFilter>,
Sets the value of place_filter.
§Example
ⓘ
use google_maps_geocode_v4::model::search_destinations_request::location_query::PlaceFilter;
let x = LocationQuery::new().set_place_filter(PlaceFilter::default()/* use setters */);Sourcepub fn set_or_clear_place_filter<T>(self, v: Option<T>) -> Selfwhere
T: Into<PlaceFilter>,
pub fn set_or_clear_place_filter<T>(self, v: Option<T>) -> Selfwhere
T: Into<PlaceFilter>,
Sets or clears the value of place_filter.
§Example
ⓘ
use google_maps_geocode_v4::model::search_destinations_request::location_query::PlaceFilter;
let x = LocationQuery::new().set_or_clear_place_filter(Some(PlaceFilter::default()/* use setters */));
let x = LocationQuery::new().set_or_clear_place_filter(None::<PlaceFilter>);Sourcepub fn set_kind<T: Into<Option<Kind>>>(self, v: T) -> Self
pub fn set_kind<T: Into<Option<Kind>>>(self, v: T) -> Self
Sets the value of kind.
Note that all the setters affecting kind are mutually
exclusive.
§Example
ⓘ
use google_cloud_type::model::LatLng;
let x = LocationQuery::new().set_kind(Some(
google_maps_geocode_v4::model::search_destinations_request::location_query::Kind::Location(LatLng::default().into())));Sourcepub fn location(&self) -> Option<&Box<LatLng>>
pub fn location(&self) -> Option<&Box<LatLng>>
The value of kind
if it holds a Location, None if the field is not set or
holds a different branch.
Sourcepub fn set_location<T: Into<Box<LatLng>>>(self, v: T) -> Self
pub fn set_location<T: Into<Box<LatLng>>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for LocationQuery
impl Clone for LocationQuery
Source§fn clone(&self) -> LocationQuery
fn clone(&self) -> LocationQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LocationQuery
impl Debug for LocationQuery
Source§impl Default for LocationQuery
impl Default for LocationQuery
Source§fn default() -> LocationQuery
fn default() -> LocationQuery
Returns the “default value” for a type. Read more
Source§impl Message for LocationQuery
impl Message for LocationQuery
Source§impl PartialEq for LocationQuery
impl PartialEq for LocationQuery
impl StructuralPartialEq for LocationQuery
Auto Trait Implementations§
impl Freeze for LocationQuery
impl RefUnwindSafe for LocationQuery
impl Send for LocationQuery
impl Sync for LocationQuery
impl Unpin for LocationQuery
impl UnsafeUnpin for LocationQuery
impl UnwindSafe for LocationQuery
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
Mutably borrows from an owned value. Read more