#[non_exhaustive]pub struct QuerySuggestion {
pub suggestion: String,
pub completable_field_paths: Vec<String>,
/* private fields */
}Available on crate feature
completion-service only.Expand description
Suggestions as search queries.
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.suggestion: StringThe suggestion for the query.
completable_field_paths: Vec<String>The unique document field paths that serve as the source of this suggestion if it was generated from completable fields.
This field is only populated for the document-completable model.
Implementations§
Source§impl QuerySuggestion
impl QuerySuggestion
pub fn new() -> Self
Sourcepub fn set_suggestion<T: Into<String>>(self, v: T) -> Self
pub fn set_suggestion<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_completable_field_paths<T, V>(self, v: T) -> Self
pub fn set_completable_field_paths<T, V>(self, v: T) -> Self
Sets the value of completable_field_paths.
§Example
ⓘ
let x = QuerySuggestion::new().set_completable_field_paths(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for QuerySuggestion
impl Clone for QuerySuggestion
Source§fn clone(&self) -> QuerySuggestion
fn clone(&self) -> QuerySuggestion
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 QuerySuggestion
impl Debug for QuerySuggestion
Source§impl Default for QuerySuggestion
impl Default for QuerySuggestion
Source§fn default() -> QuerySuggestion
fn default() -> QuerySuggestion
Returns the “default value” for a type. Read more
Source§impl Message for QuerySuggestion
impl Message for QuerySuggestion
Source§impl PartialEq for QuerySuggestion
impl PartialEq for QuerySuggestion
impl StructuralPartialEq for QuerySuggestion
Auto Trait Implementations§
impl Freeze for QuerySuggestion
impl RefUnwindSafe for QuerySuggestion
impl Send for QuerySuggestion
impl Sync for QuerySuggestion
impl Unpin for QuerySuggestion
impl UnwindSafe for QuerySuggestion
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