Attribute Macro scylla_udf::export_udt
source · #[export_udt]
Expand description
This macro allows mapping a Rust struct to a UDT from Scylla, and using in a scylla_udf function.
To use it, you need to define a struct with the same fields as the Scylla UDT. For example, for a UDT defined as:
CREATE TYPE udt (
a int,
b double,
c text,
);
you need to define a struct:
#[scylla_udf::export_udt]
struct Udt {
a: i32,
b: f64,
c: String,
}