pub trait ModifierNode: Any {
// Required method
fn as_any(&self) -> &dyn Any;
// Provided methods
fn on_attach(&self) { ... }
fn on_detach(&self) { ... }
}Expand description
A live modifier node.
Implementors keep their own state behind interior mutability. Lifecycle
callbacks run once: on_attach the first time the node is painted,
on_detach when the last handle referencing it is dropped.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".