ferro_static_type
macro · ferroui-base · v0.5.0
macro_rules! ferro_static_type
Declares the runtime type of a type that is not a class: a type that owns attached properties and cannot be instantiated as an object.
pub struct KeyboardNavigation;
ferro_static_type!(KeyboardNavigation);
ferro_properties! {
impl KeyboardNavigation {
pub fn tab_index_property() -> AttachedProperty<i32> { .. }
}
}
Unlike a hand-written impl StaticType, the runtime type carries the
static initialisation of the type (its ferro_properties! block and its
fn static_constructor(), as for a class), so its properties are found
by owner type and name before any accessor was called, and it knows its
module, hence its namespace.
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.