iced-markup 0.1.0-beta

A declarative markup DSL for building Iced GUI applications in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use syn::{Expr, Ident};

/// Represents a widget modifier or property.
///
/// Syntax: `name: value` inside `![ ... ]`
pub struct Attribute {
    /// The name of the modifier (e.g., `spacing`, `padding`, `on_press`).
    pub name: Ident,

    /// Whether this is an event shorthand (using the `+` prefix).
    pub is_event: bool,

    /// The value to pass to the modifier function.
    pub value: Expr,
}