#[non_exhaustive]pub struct SearchInfo {
pub search_query: String,
pub order_by: String,
pub offset: Option<i32>,
/* private fields */
}recommendation-service or user-event-service only.Expand description
Detailed search information.
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.search_query: StringThe user’s search query.
See SearchRequest.query for definition.
The value must be a UTF-8 encoded string with a length limit of 5,000
characters. Otherwise, an INVALID_ARGUMENT error is returned.
At least one of
search_query or
PageInfo.page_category
is required for search events. Other event types should not set this
field. Otherwise, an INVALID_ARGUMENT error is returned.
order_by: StringThe order in which products are returned, if applicable.
See SearchRequest.order_by for definition and syntax.
The value must be a UTF-8 encoded string with a length limit of 1,000
characters. Otherwise, an INVALID_ARGUMENT error is returned.
This can only be set for search events. Other event types should not set
this field. Otherwise, an INVALID_ARGUMENT error is returned.
offset: Option<i32>An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant).
See SearchRequest.offset for definition.
If this field is negative, an INVALID_ARGUMENT is returned.
This can only be set for search events. Other event types should not set
this field. Otherwise, an INVALID_ARGUMENT error is returned.
Implementations§
Source§impl SearchInfo
impl SearchInfo
pub fn new() -> Self
Sourcepub fn set_search_query<T: Into<String>>(self, v: T) -> Self
pub fn set_search_query<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_order_by<T: Into<String>>(self, v: T) -> Self
pub fn set_order_by<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_offset<T>(self, v: T) -> Self
pub fn set_offset<T>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for SearchInfo
impl Clone for SearchInfo
Source§fn clone(&self) -> SearchInfo
fn clone(&self) -> SearchInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more