pub trait Mountable {
// Required methods
fn unmount(&mut self);
fn mount(&mut self, parent: &Element, marker: Option<&Node>);
fn insert_before_this(&self, child: &mut dyn Mountable) -> bool;
fn elements(&self) -> Vec<Element>;
// Provided methods
fn try_mount(&mut self, parent: &Element, marker: Option<&Node>) -> bool { ... }
fn insert_before_this_or_marker(
&self,
parent: &Element,
child: &mut dyn Mountable,
marker: Option<&Node>,
) { ... }
}Expand description
Allows a type to be mounted to the DOM.
Required Methods§
Sourcefn insert_before_this(&self, child: &mut dyn Mountable) -> bool
fn insert_before_this(&self, child: &mut dyn Mountable) -> bool
Inserts another Mountable type before this one. Returns false if
this does not actually exist in the UI (for example, ()).