Struct merino_suggest_traits::Suggestion
source · [−]pub struct Suggestion {
pub id: u32,
pub full_keyword: String,
pub title: String,
pub url: Uri,
pub impression_url: Option<Uri>,
pub click_url: Option<Uri>,
pub provider: String,
pub advertiser: String,
pub is_sponsored: bool,
pub icon: Uri,
pub score: Proportion,
}
Expand description
A suggestion to provide to a user.
Fields
id: u32
The content provider ID of the suggestion.
full_keyword: String
If this suggestion can be matched with partial keywords this is the full keyword of the suggestion.
title: String
The title to display to the user.
url: Uri
The URL to send the user to if they select this suggestion.
impression_url: Option<Uri>
The URL to notify when this keyword is presented to a user.
click_url: Option<Uri>
The URL to notify when this keyword is clicked on by a user.
provider: String
The name of the provider associated with this suggestion.
advertiser: String
The name of the advertiser associated with this suggestion.
is_sponsored: bool
Whether this suggestion is sponsored.
icon: Uri
The URL of the icon to show along side this suggestion.
score: Proportion
A value used to compare suggestions. When choosing a suggestion to show the user, higher scored suggestions are preferred. Should range from 0.0 to 1.0.
Note that Firefox uses a static value of 0.2 for Remote Settings provided suggestions.
Trait Implementations
sourceimpl Clone for Suggestion
impl Clone for Suggestion
sourcefn clone(&self) -> Suggestion
fn clone(&self) -> Suggestion
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 Suggestion
impl Debug for Suggestion
sourceimpl<'de> Deserialize<'de> for Suggestion
impl<'de> Deserialize<'de> for Suggestion
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<F> Dummy<F> for Suggestion
impl<F> Dummy<F> for Suggestion
sourceimpl Hash for Suggestion
impl Hash for Suggestion
sourceimpl PartialEq<Suggestion> for Suggestion
impl PartialEq<Suggestion> for Suggestion
sourcefn eq(&self, other: &Suggestion) -> bool
fn eq(&self, other: &Suggestion) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Suggestion) -> bool
fn ne(&self, other: &Suggestion) -> bool
This method tests for !=
.
sourceimpl Serialize for Suggestion
impl Serialize for Suggestion
impl Eq for Suggestion
impl StructuralEq for Suggestion
impl StructuralPartialEq for Suggestion
Auto Trait Implementations
impl RefUnwindSafe for Suggestion
impl Send for Suggestion
impl Sync for Suggestion
impl Unpin for Suggestion
impl UnwindSafe for Suggestion
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<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
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