#[non_exhaustive]pub struct SearchHint {
pub index_type: Option<IndexType>,
/* private fields */
}Expand description
Represents a hint to the search index engine.
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.index_type: Option<IndexType>The type of index to use.
Implementations§
Source§impl SearchHint
impl SearchHint
pub fn new() -> Self
Sourcepub fn set_index_type<T: Into<Option<IndexType>>>(self, v: T) -> Self
pub fn set_index_type<T: Into<Option<IndexType>>>(self, v: T) -> Self
Sets the value of index_type.
Note that all the setters affecting index_type are mutually
exclusive.
§Example
ⓘ
use google_cloud_vectorsearch_v1::model::search_hint::KnnHint;
let x = SearchHint::new().set_index_type(Some(
google_cloud_vectorsearch_v1::model::search_hint::IndexType::KnnHint(KnnHint::default().into())));Sourcepub fn knn_hint(&self) -> Option<&Box<KnnHint>>
pub fn knn_hint(&self) -> Option<&Box<KnnHint>>
The value of index_type
if it holds a KnnHint, None if the field is not set or
holds a different branch.
Sourcepub fn set_knn_hint<T: Into<Box<KnnHint>>>(self, v: T) -> Self
pub fn set_knn_hint<T: Into<Box<KnnHint>>>(self, v: T) -> Self
Sets the value of index_type
to hold a KnnHint.
Note that all the setters affecting index_type are
mutually exclusive.
§Example
ⓘ
use google_cloud_vectorsearch_v1::model::search_hint::KnnHint;
let x = SearchHint::new().set_knn_hint(KnnHint::default()/* use setters */);
assert!(x.knn_hint().is_some());
assert!(x.index_hint().is_none());Sourcepub fn index_hint(&self) -> Option<&Box<IndexHint>>
pub fn index_hint(&self) -> Option<&Box<IndexHint>>
The value of index_type
if it holds a IndexHint, None if the field is not set or
holds a different branch.
Sourcepub fn set_index_hint<T: Into<Box<IndexHint>>>(self, v: T) -> Self
pub fn set_index_hint<T: Into<Box<IndexHint>>>(self, v: T) -> Self
Sets the value of index_type
to hold a IndexHint.
Note that all the setters affecting index_type are
mutually exclusive.
§Example
ⓘ
use google_cloud_vectorsearch_v1::model::search_hint::IndexHint;
let x = SearchHint::new().set_index_hint(IndexHint::default()/* use setters */);
assert!(x.index_hint().is_some());
assert!(x.knn_hint().is_none());Trait Implementations§
Source§impl Clone for SearchHint
impl Clone for SearchHint
Source§fn clone(&self) -> SearchHint
fn clone(&self) -> SearchHint
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 SearchHint
impl Debug for SearchHint
Source§impl Default for SearchHint
impl Default for SearchHint
Source§fn default() -> SearchHint
fn default() -> SearchHint
Returns the “default value” for a type. Read more
Source§impl PartialEq for SearchHint
impl PartialEq for SearchHint
impl StructuralPartialEq for SearchHint
Auto Trait Implementations§
impl Freeze for SearchHint
impl RefUnwindSafe for SearchHint
impl Send for SearchHint
impl Sync for SearchHint
impl Unpin for SearchHint
impl UnsafeUnpin for SearchHint
impl UnwindSafe for SearchHint
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