Derive Macro Schema

Source
#[derive(Schema)]
{
    // Attributes available to this derive:
    #[col]
}
Expand description

Derive macro to convert a struct to a schema.

§Example

use api::v1::ColumnSchema;

#[derive(Schema)]
struct SchemaTest {
    my_value: i32,
    #[col(name = "string_value", datatype = "string", semantic = "tag")]
    my_string: String,  
    my_bool: bool,
    my_float: f32,
    #[col(
        name = "timestamp_value",
        semantic = "Timestamp",
        datatype = "TimestampMillisecond"
    )]
    my_timestamp: i64,
    #[col(skip)]
    my_skip: i32,
}

let schema = SchemaTest::schema();