pub struct StatsSet { /* private fields */ }
Implementations§
Source§impl StatsSet
impl StatsSet
Sourcepub fn new_unchecked(values: Vec<(Stat, ScalarValue)>) -> Self
pub fn new_unchecked(values: Vec<(Stat, ScalarValue)>) -> Self
Create new StatSet without validating uniqueness of all the entries
§Safety
This method will not panic or trigger UB, but may lead to duplicate stats being stored.
Sourcepub fn nulls(len: usize, dtype: &DType) -> Self
pub fn nulls(len: usize, dtype: &DType) -> Self
Specialized constructor for the case where the StatsSet represents an array consisting entirely of null values.
pub fn constant(scalar: Scalar, length: usize) -> Self
pub fn bools_with_true_and_null_count( true_count: usize, null_count: usize, len: usize, ) -> Self
pub fn of<S: Into<ScalarValue>>(stat: Stat, value: S) -> Self
Source§impl StatsSet
impl StatsSet
pub fn get(&self, stat: Stat) -> Option<&ScalarValue>
pub fn get_as<T: for<'a> TryFrom<&'a ScalarValue, Error = VortexError>>( &self, stat: Stat, ) -> Option<T>
Sourcepub fn set<S: Into<ScalarValue>>(&mut self, stat: Stat, value: S)
pub fn set<S: Into<ScalarValue>>(&mut self, stat: Stat, value: S)
Set the stat stat
to value
.
pub fn retain_only(&mut self, stats: &[Stat])
Source§impl StatsSet
impl StatsSet
Sourcepub fn merge_ordered(self, other: &Self, dtype: &DType) -> Self
pub fn merge_ordered(self, other: &Self, dtype: &DType) -> Self
Merge stats set other
into self
, with the semantic assumption that other
contains stats from an array that is appended to the array represented by self
.
Sourcepub fn merge_unordered(self, other: &Self, dtype: &DType) -> Self
pub fn merge_unordered(self, other: &Self, dtype: &DType) -> Self
Merge stats set other
into self
, with no assumption on ordering.
Stats that are not commutative (e.g., is_sorted) are dropped from the result.
Trait Implementations§
Source§impl Extend<(Stat, ScalarValue)> for StatsSet
impl Extend<(Stat, ScalarValue)> for StatsSet
Source§fn extend<T: IntoIterator<Item = (Stat, ScalarValue)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (Stat, ScalarValue)>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl FromIterator<(Stat, ScalarValue)> for StatsSet
impl FromIterator<(Stat, ScalarValue)> for StatsSet
Source§fn from_iter<T: IntoIterator<Item = (Stat, ScalarValue)>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = (Stat, ScalarValue)>>(iter: T) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl Freeze for StatsSet
impl RefUnwindSafe for StatsSet
impl Send for StatsSet
impl Sync for StatsSet
impl Unpin for StatsSet
impl UnwindSafe for StatsSet
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> 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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out
indicating that a T
is niched.