polars_lazy::dsl

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> { ... }
}

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 FunctionOutputField for PythonGetOutput

§

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