Enum tantivy_columnar::Cardinality
source · #[repr(u8)]pub enum Cardinality {
Full = 0,
Optional = 1,
Multivalued = 2,
}
Expand description
Enum describing the number of values that can exist per document (or per row if you will).
The cardinality must fit on 2 bits.
Variants§
Full = 0
All documents contain exactly one value.
Full
is the default for auto-detecting the Cardinality, since it is the most strict.
Optional = 1
All documents contain at most one value.
Multivalued = 2
All documents may contain any number of values.
Implementations§
source§impl Cardinality
impl Cardinality
pub fn is_optional(&self) -> bool
pub fn is_multivalue(&self) -> bool
pub fn is_full(&self) -> bool
Trait Implementations§
source§impl BinarySerializable for Cardinality
impl BinarySerializable for Cardinality
source§impl Clone for Cardinality
impl Clone for Cardinality
source§fn clone(&self) -> Cardinality
fn clone(&self) -> Cardinality
Returns a copy 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 Cardinality
impl Debug for Cardinality
source§impl Default for Cardinality
impl Default for Cardinality
source§fn default() -> Cardinality
fn default() -> Cardinality
Returns the “default value” for a type. Read more
source§impl Display for Cardinality
impl Display for Cardinality
source§impl Hash for Cardinality
impl Hash for Cardinality
source§impl Ord for Cardinality
impl Ord for Cardinality
source§fn cmp(&self, other: &Cardinality) -> Ordering
fn cmp(&self, other: &Cardinality) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Cardinality
impl PartialEq for Cardinality
source§fn eq(&self, other: &Cardinality) -> bool
fn eq(&self, other: &Cardinality) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Cardinality
impl PartialOrd for Cardinality
source§fn partial_cmp(&self, other: &Cardinality) -> Option<Ordering>
fn partial_cmp(&self, other: &Cardinality) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Cardinality
impl Eq for Cardinality
impl StructuralPartialEq for Cardinality
Auto Trait Implementations§
impl Freeze for Cardinality
impl RefUnwindSafe for Cardinality
impl Send for Cardinality
impl Sync for Cardinality
impl Unpin for Cardinality
impl UnwindSafe for Cardinality
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.