euv-macros 0.52.0

Zero-overhead procedural macros for the cross-platform euv UI framework, providing view!, style!, var!, watch!, computed!, state!, #[store], #[component], #[event], emit!, on!, and #[euv].
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

/// Parsed `state!(...)` invocation supporting scoped local state, global lookup, or lazy global initialization.
pub(crate) enum StateInput {
    /// Scoped component/page `LocalState::new(init_expr)`.
    Local(Box<Expr>),
    /// Lookup an already-registered global state (`Option<Signal<T>>`).
    GlobalLookup(Box<Type>),
    /// Lookup or lazily initialize global state (`Signal<T>`).
    GlobalInit {
        /// Global state type.
        ty: Box<Type>,
        /// Initial value expression.
        init: Box<Expr>,
    },
}