Skip to main content

ModuleInstance

Trait ModuleInstance 

Source
pub trait ModuleInstance {
    // Required methods
    fn update(&mut self, props: &Map<String, Value>);
    fn destroy(self: Box<Self>);
}
Expand description

A mounted module.

Required Methods§

Source

fn update(&mut self, props: &Map<String, Value>)

New props: a route to the same component with other params.

Source

fn destroy(self: Box<Self>)

Takes it out: its DOM, its subscriptions, its listeners.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§