pub struct FieldSchema { /* private fields */ }Implementations§
Source§impl FieldSchema
Typed constructors for FieldSchemaBuilder.
impl FieldSchema
Typed constructors for FieldSchemaBuilder.
These cover the data types commonly used in documents; for rarer
types call FieldSchema::custom or build a FieldSchema
directly with FieldSchema::new.
pub fn string(name: impl Into<String>) -> FieldSchemaBuilder
pub fn binary(name: impl Into<String>) -> FieldSchemaBuilder
pub fn bool(name: impl Into<String>) -> FieldSchemaBuilder
pub fn int32(name: impl Into<String>) -> FieldSchemaBuilder
pub fn int64(name: impl Into<String>) -> FieldSchemaBuilder
pub fn uint32(name: impl Into<String>) -> FieldSchemaBuilder
pub fn uint64(name: impl Into<String>) -> FieldSchemaBuilder
pub fn float(name: impl Into<String>) -> FieldSchemaBuilder
pub fn double(name: impl Into<String>) -> FieldSchemaBuilder
pub fn vector_fp32(name: impl Into<String>, dim: u32) -> FieldSchemaBuilder
pub fn vector_fp64(name: impl Into<String>, dim: u32) -> FieldSchemaBuilder
pub fn vector_fp16(name: impl Into<String>, dim: u32) -> FieldSchemaBuilder
pub fn vector_int8(name: impl Into<String>, dim: u32) -> FieldSchemaBuilder
pub fn vector_int16(name: impl Into<String>, dim: u32) -> FieldSchemaBuilder
pub fn vector_int4(name: impl Into<String>, dim: u32) -> FieldSchemaBuilder
Source§impl FieldSchema
impl FieldSchema
pub fn new( name: &str, data_type: DataType, nullable: bool, dimension: u32, ) -> Result<Self>
Sourcepub fn borrow(&self) -> FieldSchemaRef<'_>
pub fn borrow(&self) -> FieldSchemaRef<'_>
Borrow as a non-owning FieldSchemaRef.
pub fn name(&self) -> Option<String>
pub fn set_name(&mut self, name: &str) -> Result<()>
pub fn data_type(&self) -> DataType
pub fn set_data_type(&mut self, t: DataType) -> Result<()>
pub fn element_data_type(&self) -> DataType
pub fn element_data_size(&self) -> usize
pub fn is_vector_field(&self) -> bool
pub fn is_dense_vector(&self) -> bool
pub fn is_sparse_vector(&self) -> bool
pub fn is_nullable(&self) -> bool
pub fn set_nullable(&mut self, nullable: bool) -> Result<()>
pub fn has_invert_index(&self) -> bool
pub fn is_array_type(&self) -> bool
pub fn dimension(&self) -> u32
pub fn set_dimension(&mut self, d: u32) -> Result<()>
pub fn index_type(&self) -> IndexType
pub fn has_index(&self) -> bool
Sourcepub fn set_index_params(&mut self, params: &IndexParams) -> Result<()>
pub fn set_index_params(&mut self, params: &IndexParams) -> Result<()>
Install a (deep-copied) index parameters object on this field.
pub fn validate(&self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FieldSchema
impl RefUnwindSafe for FieldSchema
impl Unpin for FieldSchema
impl UnsafeUnpin for FieldSchema
impl UnwindSafe for FieldSchema
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