Skip to main content

ColumnsUdf

Trait ColumnsUdf 

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

    // Provided method
    fn as_any(&self) -> &(dyn Any + 'static) { ... }
}
Expand description

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

Required Methods§

Source

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

Provided Methods§

Source

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

Trait Implementations§

Source§

impl Debug for dyn ColumnsUdf

Source§

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

Formats the value using the given formatter. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ColumnsUdf for PythonUdfExpression

Source§

impl<F, DT> ColumnsUdf for BaseColumnUdf<F, DT>
where F: Fn(&mut [Column]) -> Result<Column, PolarsError> + Send + Sync, DT: Fn(&Schema<DataType, ()>, &[Field]) -> Result<Field, PolarsError> + Send + Sync,

Source§

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