Trait polars_lazy::dsl::SeriesUdf

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

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

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

Required Methods§

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

Provided Methods§

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

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

fn get_output(&self) -> Option<SpecialEq<Arc<dyn FunctionOutputField>>>

Trait Implementations§

§

impl Debug for dyn SeriesUdf

§

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

Formats the value using the given formatter. Read more

Implementors§

§

impl SeriesUdf for PythonUdfExpression

§

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