Trait polars_plan::dsl::SeriesUdf

source ·
pub trait SeriesUdf: Send + Sync {
    // Required method
    fn call_udf(&self, s: &mut [Series]) -> PolarsResult<Option<Series>>;

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

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

Required Methods§

source

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

Provided Methods§

source

fn as_any(&self) -> &dyn Any

source

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

source

fn get_output(&self) -> Option<GetOutput>

Trait Implementations§

source§

impl Debug for dyn SeriesUdf

source§

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

Formats the value using the given formatter. Read more

Implementors§

source§

impl SeriesUdf for PythonUdfExpression

Available on crate feature python only.
source§

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