ScalarOps

Trait ScalarOps 

Source
pub trait ScalarOps:
    Sealed
    + Sized
    + Into<Scalar> {
    // Required methods
    fn is_valid(&self) -> bool;
    fn mask_validity(&mut self, mask: bool);
    fn repeat(&self, n: usize) -> VectorMut;

    // Provided method
    fn is_null(&self) -> bool { ... }
}
Expand description

Trait for scalar operations.

Required Methods§

Source

fn is_valid(&self) -> bool

Returns true if the scalar is valid (not null).

Source

fn mask_validity(&mut self, mask: bool)

Intersect the validity of this scalar with the provided mask value.

If the mask is true, the scalar’s validity remains unchanged. If the mask is false, the resulting scalar is null.

Source

fn repeat(&self, n: usize) -> VectorMut

Creates a new vector with n repetitions of this scalar.

Provided Methods§

Source

fn is_null(&self) -> bool

Returns true if the scalar is null.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§