Struct respo::RespoEffect
source · pub struct RespoEffect {
pub args: Vec<RespoEffectArg>,
/* private fields */
}
Expand description
effects that attached to components
Fields§
§args: Vec<RespoEffectArg>
arguments passed to this effect.
the events WillUpdate
and Updated
are triggered when these arguments are changed
Implementations§
source§impl RespoEffect
impl RespoEffect
pub fn run(&self, effect_type: RespoEffectType, el: &Node) -> Result<(), String>
pub fn new<U, V>(args: Vec<V>, handler: U) -> Selfwhere
U: Fn(Vec<RespoEffectArg>, RespoEffectType, &Node) -> Result<(), String> + 'static,
V: Serialize,
sourcepub fn new_insular<U>(handler: U) -> Selfwhere
U: Fn(Vec<RespoEffectArg>, RespoEffectType, &Node) -> Result<(), String> + 'static,
pub fn new_insular<U>(handler: U) -> Selfwhere
U: Fn(Vec<RespoEffectArg>, RespoEffectType, &Node) -> Result<(), String> + 'static,
no need to have args, only handler
Trait Implementations§
source§impl Clone for RespoEffect
impl Clone for RespoEffect
source§fn clone(&self) -> RespoEffect
fn clone(&self) -> RespoEffect
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more