polars_plan::dsl

Trait ColumnsUdf

Source
pub trait ColumnsUdf: Send + Sync {
    // Required method
    fn call_udf(&self, s: &mut [Column]) -> PolarsResult<Option<Column>>;

    // Provided methods
    fn as_any(&self) -> &dyn Any { ... }
    fn try_serialize(&self, _buf: &mut Vec<u8>) -> PolarsResult<()> { ... }
}
Expand description

A wrapper trait for any closure Fn(Vec<Series>) -> PolarsResult<Series>

Required Methods§

Source

fn call_udf(&self, s: &mut [Column]) -> PolarsResult<Option<Column>>

Provided Methods§

Source

fn as_any(&self) -> &dyn Any

Source

fn try_serialize(&self, _buf: &mut Vec<u8>) -> PolarsResult<()>

Trait Implementations§

Source§

impl Debug for dyn ColumnsUdf

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§

Source§

impl ColumnsUdf for PythonUdfExpression

Available on crate feature python only.
Source§

impl<F> ColumnsUdf for F
where F: Fn(&mut [Column]) -> PolarsResult<Option<Column>> + Send + Sync,