#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SearchInfo
impl Debug for SearchInfo
Source§impl Default for SearchInfo
impl Default for SearchInfo
Source§fn default() -> SearchInfo
fn default() -> SearchInfo
Source§impl PartialEq for SearchInfo
impl PartialEq for SearchInfo
impl StructuralPartialEq for SearchInfo
Auto Trait Implementations§
impl Freeze for SearchInfo
impl RefUnwindSafe for SearchInfo
impl Send for SearchInfo
impl Sync for SearchInfo
impl Unpin for SearchInfo
impl UnsafeUnpin for SearchInfo
impl UnwindSafe for SearchInfo
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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