#[non_exhaustive]pub struct SuggestModelBuilder { /* private fields */ }
Expand description
A builder for SuggestModel
.
Implementations§
source§impl SuggestModelBuilder
impl SuggestModelBuilder
sourcepub fn query(self, input: impl Into<String>) -> Self
pub fn query(self, input: impl Into<String>) -> Self
The query string specified in the suggest request.
sourcepub fn set_query(self, input: Option<String>) -> Self
pub fn set_query(self, input: Option<String>) -> Self
The query string specified in the suggest request.
sourcepub fn found(self, input: i64) -> Self
pub fn found(self, input: i64) -> Self
The number of documents that were found to match the query string.
sourcepub fn set_found(self, input: Option<i64>) -> Self
pub fn set_found(self, input: Option<i64>) -> Self
The number of documents that were found to match the query string.
sourcepub fn get_found(&self) -> &Option<i64>
pub fn get_found(&self) -> &Option<i64>
The number of documents that were found to match the query string.
sourcepub fn suggestions(self, input: SuggestionMatch) -> Self
pub fn suggestions(self, input: SuggestionMatch) -> Self
Appends an item to suggestions
.
To override the contents of this collection use set_suggestions
.
The documents that match the query string.
sourcepub fn set_suggestions(self, input: Option<Vec<SuggestionMatch>>) -> Self
pub fn set_suggestions(self, input: Option<Vec<SuggestionMatch>>) -> Self
The documents that match the query string.
sourcepub fn get_suggestions(&self) -> &Option<Vec<SuggestionMatch>>
pub fn get_suggestions(&self) -> &Option<Vec<SuggestionMatch>>
The documents that match the query string.
sourcepub fn build(self) -> SuggestModel
pub fn build(self) -> SuggestModel
Consumes the builder and constructs a SuggestModel
.
Trait Implementations§
source§impl Clone for SuggestModelBuilder
impl Clone for SuggestModelBuilder
source§fn clone(&self) -> SuggestModelBuilder
fn clone(&self) -> SuggestModelBuilder
Returns a copy 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 SuggestModelBuilder
impl Debug for SuggestModelBuilder
source§impl Default for SuggestModelBuilder
impl Default for SuggestModelBuilder
source§fn default() -> SuggestModelBuilder
fn default() -> SuggestModelBuilder
Returns the “default value” for a type. Read more
source§impl PartialEq for SuggestModelBuilder
impl PartialEq for SuggestModelBuilder
source§fn eq(&self, other: &SuggestModelBuilder) -> bool
fn eq(&self, other: &SuggestModelBuilder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SuggestModelBuilder
Auto Trait Implementations§
impl Freeze for SuggestModelBuilder
impl RefUnwindSafe for SuggestModelBuilder
impl Send for SuggestModelBuilder
impl Sync for SuggestModelBuilder
impl Unpin for SuggestModelBuilder
impl UnwindSafe for SuggestModelBuilder
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
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.