#[non_exhaustive]pub struct VectorField {
pub vector_type_config: Option<VectorTypeConfig>,
/* private fields */
}Expand description
Message describing a vector field.
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.vector_type_config: Option<VectorTypeConfig>Vector type configuration.
Implementations§
Source§impl VectorField
impl VectorField
pub fn new() -> Self
Sourcepub fn set_vector_type_config<T: Into<Option<VectorTypeConfig>>>(
self,
v: T,
) -> Self
pub fn set_vector_type_config<T: Into<Option<VectorTypeConfig>>>( self, v: T, ) -> Self
Sets the value of vector_type_config.
Note that all the setters affecting vector_type_config are mutually
exclusive.
§Example
ⓘ
use google_cloud_vectorsearch_v1::model::DenseVectorField;
let x = VectorField::new().set_vector_type_config(Some(
google_cloud_vectorsearch_v1::model::vector_field::VectorTypeConfig::DenseVector(DenseVectorField::default().into())));Sourcepub fn dense_vector(&self) -> Option<&Box<DenseVectorField>>
pub fn dense_vector(&self) -> Option<&Box<DenseVectorField>>
The value of vector_type_config
if it holds a DenseVector, None if the field is not set or
holds a different branch.
Sourcepub fn set_dense_vector<T: Into<Box<DenseVectorField>>>(self, v: T) -> Self
pub fn set_dense_vector<T: Into<Box<DenseVectorField>>>(self, v: T) -> Self
Sets the value of vector_type_config
to hold a DenseVector.
Note that all the setters affecting vector_type_config are
mutually exclusive.
§Example
ⓘ
use google_cloud_vectorsearch_v1::model::DenseVectorField;
let x = VectorField::new().set_dense_vector(DenseVectorField::default()/* use setters */);
assert!(x.dense_vector().is_some());
assert!(x.sparse_vector().is_none());Sourcepub fn sparse_vector(&self) -> Option<&Box<SparseVectorField>>
pub fn sparse_vector(&self) -> Option<&Box<SparseVectorField>>
The value of vector_type_config
if it holds a SparseVector, None if the field is not set or
holds a different branch.
Sourcepub fn set_sparse_vector<T: Into<Box<SparseVectorField>>>(self, v: T) -> Self
pub fn set_sparse_vector<T: Into<Box<SparseVectorField>>>(self, v: T) -> Self
Sets the value of vector_type_config
to hold a SparseVector.
Note that all the setters affecting vector_type_config are
mutually exclusive.
§Example
ⓘ
use google_cloud_vectorsearch_v1::model::SparseVectorField;
let x = VectorField::new().set_sparse_vector(SparseVectorField::default()/* use setters */);
assert!(x.sparse_vector().is_some());
assert!(x.dense_vector().is_none());Trait Implementations§
Source§impl Clone for VectorField
impl Clone for VectorField
Source§fn clone(&self) -> VectorField
fn clone(&self) -> VectorField
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 VectorField
impl Debug for VectorField
Source§impl Default for VectorField
impl Default for VectorField
Source§fn default() -> VectorField
fn default() -> VectorField
Returns the “default value” for a type. Read more
Source§impl Message for VectorField
impl Message for VectorField
Source§impl PartialEq for VectorField
impl PartialEq for VectorField
impl StructuralPartialEq for VectorField
Auto Trait Implementations§
impl Freeze for VectorField
impl RefUnwindSafe for VectorField
impl Send for VectorField
impl Sync for VectorField
impl Unpin for VectorField
impl UnsafeUnpin for VectorField
impl UnwindSafe for VectorField
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