#[non_exhaustive]pub struct SearchResult {
pub data_object: Option<DataObject>,
pub distance: Option<f64>,
/* private fields */
}Expand description
A single search result.
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.data_object: Option<DataObject>Output only. The matching data object.
distance: Option<f64>Output only. Similarity distance or ranker score returned by BatchSearchDataObjects.
Implementations§
Source§impl SearchResult
impl SearchResult
pub fn new() -> Self
Sourcepub fn set_data_object<T>(self, v: T) -> Selfwhere
T: Into<DataObject>,
pub fn set_data_object<T>(self, v: T) -> Selfwhere
T: Into<DataObject>,
Sets the value of data_object.
§Example
ⓘ
use google_cloud_vectorsearch_v1::model::DataObject;
let x = SearchResult::new().set_data_object(DataObject::default()/* use setters */);Sourcepub fn set_or_clear_data_object<T>(self, v: Option<T>) -> Selfwhere
T: Into<DataObject>,
pub fn set_or_clear_data_object<T>(self, v: Option<T>) -> Selfwhere
T: Into<DataObject>,
Sets or clears the value of data_object.
§Example
ⓘ
use google_cloud_vectorsearch_v1::model::DataObject;
let x = SearchResult::new().set_or_clear_data_object(Some(DataObject::default()/* use setters */));
let x = SearchResult::new().set_or_clear_data_object(None::<DataObject>);Sourcepub fn set_distance<T>(self, v: T) -> Self
pub fn set_distance<T>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for SearchResult
impl Clone for SearchResult
Source§fn clone(&self) -> SearchResult
fn clone(&self) -> SearchResult
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 SearchResult
impl Debug for SearchResult
Source§impl Default for SearchResult
impl Default for SearchResult
Source§fn default() -> SearchResult
fn default() -> SearchResult
Returns the “default value” for a type. Read more
Source§impl Message for SearchResult
impl Message for SearchResult
Source§impl PartialEq for SearchResult
impl PartialEq for SearchResult
impl StructuralPartialEq for SearchResult
Auto Trait Implementations§
impl Freeze for SearchResult
impl RefUnwindSafe for SearchResult
impl Send for SearchResult
impl Sync for SearchResult
impl Unpin for SearchResult
impl UnsafeUnpin for SearchResult
impl UnwindSafe for SearchResult
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