#[derive(StructType)]Expand description
Derive StructType for user defined struct.
Structs that implement StructType can be used as Arrow struct types.
§Examples
ⓘ
#[derive(StructType)]
struct KeyValue<'a> {
key: &'a str,
value: &'a str,
}ⓘ
#[function("split_kv(string) -> struct KeyValue")]
fn split_kv(kv: &str) -> Option<KeyValue<'_>> {
let (key, value) = kv.split_once('=')?;
Some(KeyValue { key, value })
}