polars_plan::dsl

Trait FunctionOutputField

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

    // Provided method
    fn try_serialize(&self, _buf: &mut Vec<u8>) -> PolarsResult<()> { ... }
}

Required Methods§

Source

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

Provided Methods§

Source

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

Implementors§

Source§

impl FunctionOutputField for PythonGetOutput

Available on crate feature python only.
Source§

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