polars_ops::chunked_array

Trait ChunkedSet

Source
pub trait ChunkedSet<T: Copy> {
    // Required method
    fn scatter<V>(self, idx: &[IdxSize], values: V) -> PolarsResult<Series>
       where V: IntoIterator<Item = Option<T>>;
}

Required Methods§

Source

fn scatter<V>(self, idx: &[IdxSize], values: V) -> PolarsResult<Series>
where V: IntoIterator<Item = Option<T>>,

Invariant for implementations: if the scatter() fails, typically because of bad indexes, then self should remain unmodified.

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.

Implementations on Foreign Types§

Source§

impl ChunkedSet<bool> for &BooleanChunked

Source§

fn scatter<V>(self, idx: &[IdxSize], values: V) -> PolarsResult<Series>
where V: IntoIterator<Item = Option<bool>>,

Source§

impl<'a> ChunkedSet<&'a str> for &'a StringChunked

Source§

fn scatter<V>(self, idx: &[IdxSize], values: V) -> PolarsResult<Series>
where V: IntoIterator<Item = Option<&'a str>>,

Source§

impl<T: PolarsOpsNumericType> ChunkedSet<<T as PolarsNumericType>::Native> for &mut ChunkedArray<T>

Source§

fn scatter<V>(self, idx: &[IdxSize], values: V) -> PolarsResult<Series>
where V: IntoIterator<Item = Option<T::Native>>,

Implementors§