#[non_exhaustive]pub struct CompleteQueryResponse {
pub query_suggestions: Vec<QuerySuggestion>,
pub tail_match_triggered: bool,
/* private fields */
}Available on crate feature
completion-service only.Expand description
Response message for CompletionService.CompleteQuery method.
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.query_suggestions: Vec<QuerySuggestion>Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.
tail_match_triggered: boolTrue if the returned suggestions are all tail suggestions.
For tail matching to be triggered, include_tail_suggestions in the request must be true and there must be no suggestions that match the full query.
Implementations§
Source§impl CompleteQueryResponse
impl CompleteQueryResponse
pub fn new() -> Self
Sourcepub fn set_query_suggestions<T, V>(self, v: T) -> Self
pub fn set_query_suggestions<T, V>(self, v: T) -> Self
Sets the value of query_suggestions.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::complete_query_response::QuerySuggestion;
let x = CompleteQueryResponse::new()
.set_query_suggestions([
QuerySuggestion::default()/* use setters */,
QuerySuggestion::default()/* use (different) setters */,
]);Sourcepub fn set_tail_match_triggered<T: Into<bool>>(self, v: T) -> Self
pub fn set_tail_match_triggered<T: Into<bool>>(self, v: T) -> Self
Sets the value of tail_match_triggered.
§Example
ⓘ
let x = CompleteQueryResponse::new().set_tail_match_triggered(true);Trait Implementations§
Source§impl Clone for CompleteQueryResponse
impl Clone for CompleteQueryResponse
Source§fn clone(&self) -> CompleteQueryResponse
fn clone(&self) -> CompleteQueryResponse
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 CompleteQueryResponse
impl Debug for CompleteQueryResponse
Source§impl Default for CompleteQueryResponse
impl Default for CompleteQueryResponse
Source§fn default() -> CompleteQueryResponse
fn default() -> CompleteQueryResponse
Returns the “default value” for a type. Read more
Source§impl Message for CompleteQueryResponse
impl Message for CompleteQueryResponse
Source§impl PartialEq for CompleteQueryResponse
impl PartialEq for CompleteQueryResponse
impl StructuralPartialEq for CompleteQueryResponse
Auto Trait Implementations§
impl Freeze for CompleteQueryResponse
impl RefUnwindSafe for CompleteQueryResponse
impl Send for CompleteQueryResponse
impl Sync for CompleteQueryResponse
impl Unpin for CompleteQueryResponse
impl UnwindSafe for CompleteQueryResponse
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