#[non_exhaustive]pub struct CompletionDetail {
pub completion_attribution_token: String,
pub selected_suggestion: String,
pub selected_position: i32,
/* private fields */
}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.completion_attribution_token: StringCompletion attribution token in CompleteQueryResponse.attribution_token.
selected_suggestion: StringEnd user selected CompleteQueryResponse.CompletionResult.suggestion.
selected_position: i32End user selected CompleteQueryResponse.CompletionResult.suggestion position, starting from 0.
Implementations§
Source§impl CompletionDetail
impl CompletionDetail
Sourcepub fn set_completion_attribution_token<T: Into<String>>(self, v: T) -> Self
pub fn set_completion_attribution_token<T: Into<String>>(self, v: T) -> Self
Sets the value of completion_attribution_token.
§Example
ⓘ
let x = CompletionDetail::new().set_completion_attribution_token("example");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 = CompletionDetail::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 = CompletionDetail::new().set_selected_position(42);Trait Implementations§
Source§impl Clone for CompletionDetail
impl Clone for CompletionDetail
Source§fn clone(&self) -> CompletionDetail
fn clone(&self) -> CompletionDetail
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 CompletionDetail
impl Debug for CompletionDetail
Source§impl Default for CompletionDetail
impl Default for CompletionDetail
Source§fn default() -> CompletionDetail
fn default() -> CompletionDetail
Returns the “default value” for a type. Read more
Source§impl Message for CompletionDetail
impl Message for CompletionDetail
Source§impl PartialEq for CompletionDetail
impl PartialEq for CompletionDetail
impl StructuralPartialEq for CompletionDetail
Auto Trait Implementations§
impl Freeze for CompletionDetail
impl RefUnwindSafe for CompletionDetail
impl Send for CompletionDetail
impl Sync for CompletionDetail
impl Unpin for CompletionDetail
impl UnsafeUnpin for CompletionDetail
impl UnwindSafe for CompletionDetail
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