polars::prelude

Trait FunctionOutputField

pub trait FunctionOutputField: Send + Sync {
    // Required method
    fn get_field(
        &self,
        input_schema: &Schema<DataType>,
        cntxt: Context,
        fields: &[Field],
    ) -> Result<Field, PolarsError>;

    // Provided method
    fn try_serialize(&self, _buf: &mut Vec<u8>) -> Result<(), PolarsError> { ... }
}
Available on crate feature lazy only.

Required Methods§

fn get_field( &self, input_schema: &Schema<DataType>, cntxt: Context, fields: &[Field], ) -> Result<Field, PolarsError>

Provided Methods§

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

Implementors§

§

impl<F> FunctionOutputField for F
where F: Fn(&Schema<DataType>, Context, &[Field]) -> Result<Field, PolarsError> + Send + Sync,