Struct google_api_proto::google::maps::places::v1::autocomplete_places_response::suggestion::QueryPrediction
source · pub struct QueryPrediction {
pub text: Option<FormattableText>,
pub structured_format: Option<StructuredFormat>,
}
Expand description
Prediction results for a Query Autocomplete prediction.
Fields§
§text: Option<FormattableText>
The predicted text. This text does not represent a Place, but rather a text query that could be used in a search endpoint (for example, Text Search).
text
is recommended for developers who wish to show a single UI
element. Developers who wish to show two separate, but related, UI
elements may want to use structured_format
instead. They are two
different ways to represent a query prediction. Users should not try to
parse structured_format
into text
or vice versa.
May be in mixed languages if the request input
and language_code
are in different languages or if part of the query does not have a
translation from the local language to language_code
.
structured_format: Option<StructuredFormat>
A breakdown of the query prediction into main text containing the query and secondary text containing additional disambiguating features (such as a city or region).
structured_format
is recommended for developers who wish to show two
separate, but related, UI elements. Developers who wish to show a
single UI element may want to use text
instead. They are two
different ways to represent a query prediction. Users should not try to
parse structured_format
into text
or vice versa.
Trait Implementations§
source§impl Clone for QueryPrediction
impl Clone for QueryPrediction
source§fn clone(&self) -> QueryPrediction
fn clone(&self) -> QueryPrediction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for QueryPrediction
impl Debug for QueryPrediction
source§impl Default for QueryPrediction
impl Default for QueryPrediction
source§impl Message for QueryPrediction
impl Message for QueryPrediction
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for QueryPrediction
impl PartialEq for QueryPrediction
source§fn eq(&self, other: &QueryPrediction) -> bool
fn eq(&self, other: &QueryPrediction) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for QueryPrediction
Auto Trait Implementations§
impl Freeze for QueryPrediction
impl RefUnwindSafe for QueryPrediction
impl Send for QueryPrediction
impl Sync for QueryPrediction
impl Unpin for QueryPrediction
impl UnwindSafe for QueryPrediction
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request