polars_lazy::dsl

Trait ColumnsUdf

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

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

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

Required Methods§

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

Provided Methods§

fn as_any(&self) -> &(dyn Any + 'static)

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

Trait Implementations§

§

impl Debug for dyn ColumnsUdf

§

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

Formats the value using the given formatter. Read more

Implementors§

§

impl ColumnsUdf for PythonUdfExpression

§

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