pub struct ValidityMask { /* private fields */ }Implementations§
Source§impl ValidityMask
impl ValidityMask
pub fn from_values(values: &[Scalar]) -> Self
Sourcepub fn from_f64(data: &[f64]) -> Self
pub fn from_f64(data: &[f64]) -> Self
Build a validity mask from a contiguous f64 buffer, marking NaN
positions invalid. pandas treats float NaN as missing, so this mirrors
what from_values would produce for the equivalent Scalar::Float64
values (Scalar::is_missing is true for NaN). See
Column::from_f64_values.
pub fn all_valid(len: usize) -> Self
pub fn all_invalid(len: usize) -> Self
pub fn get(&self, idx: usize) -> bool
pub fn set(&mut self, idx: usize, value: bool)
pub fn count_valid(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn and_mask(&self, other: &Self) -> Self
pub fn or_mask(&self, other: &Self) -> Self
pub fn not_mask(&self) -> Self
Sourcepub fn bits(&self) -> impl Iterator<Item = bool> + '_
pub fn bits(&self) -> impl Iterator<Item = bool> + '_
Returns an iterator yielding bool values, compatible with the previous
&[bool] API. Materializes from the packed representation.
Sourcepub fn count_invalid(&self) -> usize
pub fn count_invalid(&self) -> usize
Number of invalid (cleared) positions.
Sourcepub fn xor_mask(&self, other: &Self) -> Self
pub fn xor_mask(&self, other: &Self) -> Self
Bitwise XOR (symmetric difference) with another mask.
Produced length is min(self.len, other.len).
Sourcepub fn slice(&self, start: usize, len: usize) -> Self
pub fn slice(&self, start: usize, len: usize) -> Self
Extract a contiguous sub-range as a new mask.
start..start+len is clamped to the available tail — callers
don’t need to pre-validate against self.len.
Sourcepub fn first_valid(&self) -> Option<usize>
pub fn first_valid(&self) -> Option<usize>
Position of the first valid bit.
Sourcepub fn last_valid(&self) -> Option<usize>
pub fn last_valid(&self) -> Option<usize>
Position of the last valid bit.
Trait Implementations§
Source§impl Clone for ValidityMask
impl Clone for ValidityMask
Source§fn clone(&self) -> ValidityMask
fn clone(&self) -> ValidityMask
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ValidityMask
impl Debug for ValidityMask
Source§impl<'de> Deserialize<'de> for ValidityMask
impl<'de> Deserialize<'de> for ValidityMask
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ValidityMask
Source§impl PartialEq for ValidityMask
impl PartialEq for ValidityMask
Auto Trait Implementations§
impl Freeze for ValidityMask
impl RefUnwindSafe for ValidityMask
impl Send for ValidityMask
impl Sync for ValidityMask
impl Unpin for ValidityMask
impl UnsafeUnpin for ValidityMask
impl UnwindSafe for ValidityMask
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