pub struct FieldSchema { /* private fields */ }Expand description
Schema definition for a single field in a collection.
Implementations§
Source§impl FieldSchema
impl FieldSchema
Sourcepub fn new(
name: &str,
data_type: DataType,
nullable: bool,
dimension: u32,
) -> Result<Self>
pub fn new( name: &str, data_type: DataType, nullable: bool, dimension: u32, ) -> Result<Self>
Creates a new field schema.
name: Field namedata_type: Data type of the fieldnullable: Whether the field can be nulldimension: Vector dimension (0 for non-vector fields)
Sourcepub fn set_index_params(&mut self, params: &IndexParams) -> Result<()>
pub fn set_index_params(&mut self, params: &IndexParams) -> Result<()>
Sets the index parameters for this field.
Sourcepub fn is_nullable(&self) -> bool
pub fn is_nullable(&self) -> bool
Returns whether the field is nullable.
Sourcepub fn is_vector_field(&self) -> bool
pub fn is_vector_field(&self) -> bool
Returns whether this is a vector field.
Sourcepub fn is_dense_vector(&self) -> bool
pub fn is_dense_vector(&self) -> bool
Returns whether this is a dense vector field.
Sourcepub fn is_sparse_vector(&self) -> bool
pub fn is_sparse_vector(&self) -> bool
Returns whether this is a sparse vector field.
Sourcepub fn index_type(&self) -> IndexType
pub fn index_type(&self) -> IndexType
Returns the index type.
Sourcepub fn is_array_type(&self) -> bool
pub fn is_array_type(&self) -> bool
Returns whether this is an array type.
Trait Implementations§
Source§impl Drop for FieldSchema
impl Drop for FieldSchema
Auto Trait Implementations§
impl !Send for FieldSchema
impl !Sync for FieldSchema
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