clew-derive

Crates.ioclew-derive
lib.rsclew-derive
version0.0.1
created_at2026-01-03 19:17:27.190672+00
updated_at2026-01-03 19:17:27.190672+00
descriptionProcedural macros for the clew UI framework.
homepage
repositoryhttps://github.com/sysint64/clew
max_upload_size
id2020689
size17,716
Andrei Kabylin (sysint64)

documentation

README

clew-derive

Procedural macros for the clew UI framework.

Macros

#[derive(WidgetState)]

Implements WidgetState trait for custom widget state structs.

#[derive(Default, WidgetState)]
pub struct MyWidget {
    counter: i32,
}

#[derive(Identifiable)]

Implements Identifiable trait. Looks for a field marked with #[id], or falls back to a field named id.

#[derive(Identifiable)]
pub struct Item {
    #[id]
    item_id: u64,
    name: String,
}

// Or simply:
#[derive(Identifiable)]
pub struct Item {
    id: u64,
    name: String,
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Commit count: 0

cargo fmt