#[non_exhaustive]pub struct CompletionInfo {
pub selected_suggestion: String,
pub selected_position: i32,
/* private fields */
}Available on crate features
recommendation-service or user-event-service only.Expand description
Detailed completion information including completion attribution token and clicked completion info.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.selected_suggestion: StringEnd user selected CompleteQueryResponse.QuerySuggestion.suggestion.
selected_position: i32End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0.
Implementations§
Source§impl CompletionInfo
impl CompletionInfo
pub fn new() -> Self
Sourcepub fn set_selected_suggestion<T: Into<String>>(self, v: T) -> Self
pub fn set_selected_suggestion<T: Into<String>>(self, v: T) -> Self
Sets the value of selected_suggestion.
§Example
ⓘ
let x = CompletionInfo::new().set_selected_suggestion("example");Sourcepub fn set_selected_position<T: Into<i32>>(self, v: T) -> Self
pub fn set_selected_position<T: Into<i32>>(self, v: T) -> Self
Sets the value of selected_position.
§Example
ⓘ
let x = CompletionInfo::new().set_selected_position(42);Trait Implementations§
Source§impl Clone for CompletionInfo
impl Clone for CompletionInfo
Source§fn clone(&self) -> CompletionInfo
fn clone(&self) -> CompletionInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompletionInfo
impl Debug for CompletionInfo
Source§impl Default for CompletionInfo
impl Default for CompletionInfo
Source§fn default() -> CompletionInfo
fn default() -> CompletionInfo
Returns the “default value” for a type. Read more
Source§impl Message for CompletionInfo
impl Message for CompletionInfo
Source§impl PartialEq for CompletionInfo
impl PartialEq for CompletionInfo
impl StructuralPartialEq for CompletionInfo
Auto Trait Implementations§
impl Freeze for CompletionInfo
impl RefUnwindSafe for CompletionInfo
impl Send for CompletionInfo
impl Sync for CompletionInfo
impl Unpin for CompletionInfo
impl UnwindSafe for CompletionInfo
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
Mutably borrows from an owned value. Read more