Struct merino_suggest_traits::SuggestionRequest
source · [−]pub struct SuggestionRequest {
pub query: String,
pub accepts_english: bool,
pub country: Option<String>,
pub region: Option<String>,
pub dma: Option<u16>,
pub city: Option<String>,
pub device_info: DeviceInfo,
pub client_variants: Option<Vec<String>>,
}
Expand description
A request for suggestions.
Fields
query: String
The text typed by the user.
accepts_english: bool
Whether or not the request indicated support for English.
country: Option<String>
Country in ISO 3166-1 alpha-2 format, such as “MX” for Mexico or “IT” for Italy.
region: Option<String>
Region/region (e.g. a US state) in ISO 3166-2 format, such as “QC” for Quebec (with country = “CA”) or “TX” for Texas (with country = “US”).
dma: Option<u16>
The Designated Market Area code, as defined by Nielsen. Only defined in the US.
city: Option<String>
City, listed by name such as “Portland” or “Berlin”.
device_info: DeviceInfo
The user agent of the request, including OS family, device form factor, and major Firefox version number.
client_variants: Option<Vec<String>>
Client Variant strings typed by the user.
Trait Implementations
sourceimpl Clone for SuggestionRequest
impl Clone for SuggestionRequest
sourcefn clone(&self) -> SuggestionRequest
fn clone(&self) -> SuggestionRequest
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SuggestionRequest
impl Debug for SuggestionRequest
sourceimpl<F> Dummy<F> for SuggestionRequest
impl<F> Dummy<F> for SuggestionRequest
sourceimpl Hash for SuggestionRequest
impl Hash for SuggestionRequest
sourceimpl Serialize for SuggestionRequest
impl Serialize for SuggestionRequest
Auto Trait Implementations
impl RefUnwindSafe for SuggestionRequest
impl Send for SuggestionRequest
impl Sync for SuggestionRequest
impl Unpin for SuggestionRequest
impl UnwindSafe for SuggestionRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<T> CallHasher for T where
T: Hash,
impl<T> CallHasher for T where
T: Hash,
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more