1 unstable release
Uses new Rust 2024
| 0.0.1 | Jan 3, 2026 |
|---|
#17 in #immediate
Used in clew-widgets
7KB
58 lines
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.
Dependencies
~120–490KB
~12K SLoC