#[non_exhaustive]pub struct SearchLinkPromotion {
pub title: String,
pub uri: String,
pub document: String,
pub image_uri: String,
pub description: String,
pub enabled: bool,
/* private fields */
}Expand description
Promotion proto includes uri and other helping information to display the promotion.
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.title: StringRequired. The title of the promotion. Maximum length: 160 characters.
uri: StringOptional. The URL for the page the user wants to promote. Must be set for site search. For other verticals, this is optional.
document: StringOptional. The Document the user wants to promote. For site search, leave unset and only populate uri. Can be set along with uri.
image_uri: StringOptional. The promotion thumbnail image url.
description: StringOptional. The Promotion description. Maximum length: 200 characters.
enabled: boolOptional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to.
This flag is used for basic site search only.
Implementations§
Source§impl SearchLinkPromotion
impl SearchLinkPromotion
pub fn new() -> Self
Sourcepub fn set_document<T: Into<String>>(self, v: T) -> Self
pub fn set_document<T: Into<String>>(self, v: T) -> Self
Sets the value of document.
Sourcepub fn set_image_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_image_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of image_uri.
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
Sourcepub fn set_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_enabled<T: Into<bool>>(self, v: T) -> Self
Sets the value of enabled.
Trait Implementations§
Source§impl Clone for SearchLinkPromotion
impl Clone for SearchLinkPromotion
Source§fn clone(&self) -> SearchLinkPromotion
fn clone(&self) -> SearchLinkPromotion
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more