zng::widget::builder

Macro property_info

source
macro_rules! property_info {
    ($($property:ident)::+ <$($generics:ty),*>) => { ... };
    ($($tt:tt)*) => { ... };
}
Expand description

New PropertyInfo from property path.

§Syntax

  • path::property: Gets the info for the property function.
  • Self::property: Gets the info for the property method on the widget.

§Examples

#[property(CONTEXT)]
pub fn foo(child: impl UiNode, bar: impl IntoValue<bool>) -> impl UiNode {
    // ..
}

assert_eq!(property_info!(path::foo).inputs[0].name, "bar");