pub struct Column<T = u64> {
pub index: ColumnIndex,
pub values: Arc<dyn ColumnValues<T>>,
}
Fields§
§index: ColumnIndex
§values: Arc<dyn ColumnValues<T>>
Implementations§
Source§impl<T: PartialOrd + Default> Column<T>
impl<T: PartialOrd + Default> Column<T>
pub fn build_empty_column(num_docs: u32) -> Column<T>
Source§impl<T: MonotonicallyMappableToU64> Column<T>
impl<T: MonotonicallyMappableToU64> Column<T>
pub fn to_u64_monotonic(self) -> Column<u64>
Source§impl<T: PartialOrd + Copy + Debug + Send + Sync + 'static> Column<T>
impl<T: PartialOrd + Copy + Debug + Send + Sync + 'static> Column<T>
pub fn get_cardinality(&self) -> Cardinality
pub fn num_docs(&self) -> RowId
pub fn min_value(&self) -> T
pub fn max_value(&self) -> T
pub fn first(&self, row_id: RowId) -> Option<T>
Sourcepub fn first_vals(&self, docids: &[DocId], output: &mut [Option<T>])
pub fn first_vals(&self, docids: &[DocId], output: &mut [Option<T>])
Load the first value for each docid in the provided slice.
Sourcepub fn row_ids_for_docs(
&self,
doc_ids: &[DocId],
doc_ids_out: &mut Vec<DocId>,
row_ids: &mut Vec<RowId>,
)
pub fn row_ids_for_docs( &self, doc_ids: &[DocId], doc_ids_out: &mut Vec<DocId>, row_ids: &mut Vec<RowId>, )
Translates a block of docis to row_ids.
returns the row_ids and the matching docids on the same index e.g. DocId In: [0, 5, 6] DocId Out: [0, 0, 6, 6] RowId Out: [0, 1, 2, 3]
pub fn values_for_doc(&self, doc_id: DocId) -> impl Iterator<Item = T> + '_
Sourcepub fn get_docids_for_value_range(
&self,
value_range: RangeInclusive<T>,
selected_docid_range: Range<u32>,
doc_ids: &mut Vec<u32>,
)
pub fn get_docids_for_value_range( &self, value_range: RangeInclusive<T>, selected_docid_range: Range<u32>, doc_ids: &mut Vec<u32>, )
Get the docids of values which are in the provided value range.
Sourcepub fn fill_vals(&self, row_id: RowId, output: &mut Vec<T>)
pub fn fill_vals(&self, row_id: RowId, output: &mut Vec<T>)
Fills the output vector with the (possibly multiple values that are associated_with
row_id
.
This method clears the output
vector.
pub fn first_or_default_col(self, default_value: T) -> Arc<dyn ColumnValues<T>>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Column<T>
impl<T = u64> !RefUnwindSafe for Column<T>
impl<T> Send for Column<T>
impl<T> Sync for Column<T>
impl<T> Unpin for Column<T>
impl<T = u64> !UnwindSafe for Column<T>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more