pub trait IEffect {
// Required method
fn run(&self);
}
Expand description
A non-generic trait for reactive effects.
IEffect
serves as a type-erased trait for Effect<F>
instances.
By implementing IEffect
, an Effect<F>
can be stored as Rc<dyn IEffect>
regardless of the specific closure type F
. This allows the reactive system
to manage multiple effects uniformly without exposing the generic type.