Struct elasticsearch_dsl::search::CompletionSuggestOption
source · [−]pub struct CompletionSuggestOption {
pub text: String,
pub index: String,
pub id: String,
pub score: f32,
pub source: Option<Value>,
pub contexts: Map<String, Vec<String>>,
}
Expand description
Suggester response item option
Fields
text: String
Suggested text
index: String
Document index
id: String
Document id
score: f32
Document score for completion suggester, suggest score for term, phrase
source: Option<Value>
Document source
Not using crate::Source due to a bug in enums and RawValue https://github.com/serde-rs/json/issues/779
contexts: Map<String, Vec<String>>
The contexts associated with the completed document
Contexts always return either as a category or as geohash
Implementations
sourceimpl CompletionSuggestOption
impl CompletionSuggestOption
sourcepub fn parse<T>(&self) -> Result<T, Error> where
T: DeserializeOwned,
pub fn parse<T>(&self) -> Result<T, Error> where
T: DeserializeOwned,
Parses document source into a concrete type
Trait Implementations
sourceimpl Clone for CompletionSuggestOption
impl Clone for CompletionSuggestOption
sourcefn clone(&self) -> CompletionSuggestOption
fn clone(&self) -> CompletionSuggestOption
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CompletionSuggestOption
impl Debug for CompletionSuggestOption
sourceimpl<'de> Deserialize<'de> for CompletionSuggestOption
impl<'de> Deserialize<'de> for CompletionSuggestOption
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<CompletionSuggestOption> for CompletionSuggestOption
impl PartialEq<CompletionSuggestOption> for CompletionSuggestOption
sourcefn eq(&self, other: &CompletionSuggestOption) -> bool
fn eq(&self, other: &CompletionSuggestOption) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CompletionSuggestOption) -> bool
fn ne(&self, other: &CompletionSuggestOption) -> bool
This method tests for !=
.
sourceimpl Serialize for CompletionSuggestOption
impl Serialize for CompletionSuggestOption
impl StructuralPartialEq for CompletionSuggestOption
Auto Trait Implementations
impl RefUnwindSafe for CompletionSuggestOption
impl Send for CompletionSuggestOption
impl Sync for CompletionSuggestOption
impl Unpin for CompletionSuggestOption
impl UnwindSafe for CompletionSuggestOption
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more