Trait Mountable

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ยง

fn unmount(&mut self)

Detaches the view from the DOM.

fn mount(&mut self, parent: &Element, marker: Option<&Node>)

Mounts a node to the interface.

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, ()).

fn elements(&self) -> Vec<Element>

wip

Provided Methodsยง

fn try_mount(&mut self, parent: &Element, marker: Option<&Node>) -> bool

Mounts a node to the interface. Returns false if it could not be mounted.

fn insert_before_this_or_marker( &self, parent: &Element, child: &mut dyn Mountable, marker: Option<&Node>, )

Inserts another Mountable type before this one, or before the marker if this one doesnโ€™t exist in the UI (for example, ()).

Implementations on Foreign Typesยง

ยง

impl Mountable for ()

ยง

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>

ยง

impl Mountable for Comment

ยง

fn unmount(&mut self)

ยง

fn mount(&mut self, parent: &Element, marker: Option<&Node>)

ยง

fn try_mount(&mut self, parent: &Element, marker: Option<&Node>) -> bool

ยง

fn insert_before_this(&self, child: &mut dyn Mountable) -> bool

ยง

fn elements(&self) -> Vec<Element>

ยง

impl Mountable for Element

ยง

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>

ยง

impl Mountable for Node

ยง

fn unmount(&mut self)

ยง

fn mount(&mut self, parent: &Element, marker: Option<&Node>)

ยง

fn try_mount(&mut self, parent: &Element, marker: Option<&Node>) -> bool

ยง

fn insert_before_this(&self, child: &mut dyn Mountable) -> bool

ยง

fn elements(&self) -> Vec<Element>

ยง

impl Mountable for Text

ยง

fn unmount(&mut self)

ยง

fn mount(&mut self, parent: &Element, marker: Option<&Node>)

ยง

fn try_mount(&mut self, parent: &Element, marker: Option<&Node>) -> bool

ยง

fn insert_before_this(&self, child: &mut dyn Mountable) -> bool

ยง

fn elements(&self) -> Vec<Element>

ยง

impl<A, B> Mountable for (A, B)
where A: Mountable, B: Mountable,

ยง

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>

ยง

impl<A, B> Mountable for Either<A, B>
where A: Mountable, B: Mountable,

ยง

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>

ยง

impl<A, B, C> Mountable for (A, B, C)
where A: Mountable, B: Mountable, C: Mountable,

ยง

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>

ยง

impl<A, B, C, D> Mountable for (A, B, C, D)
where A: Mountable, B: Mountable, C: Mountable, D: Mountable,

ยง

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>

ยง

impl<A, B, C, D, E> Mountable for (A, B, C, D, E)
where A: Mountable, B: Mountable, C: Mountable, D: Mountable, E: Mountable,

ยง

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>

ยง

impl<A, B, C, D, E, F> Mountable for (A, B, C, D, E, F)

ยง

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>

ยง

impl<A, B, C, D, E, F, G> Mountable for (A, B, C, D, E, F, G)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H> Mountable for (A, B, C, D, E, F, G, H)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I> Mountable for (A, B, C, D, E, F, G, H, I)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J> Mountable for (A, B, C, D, E, F, G, H, I, J)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K> Mountable for (A, B, C, D, E, F, G, H, I, J, K)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y)

ยง

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>

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> Mountable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

ยง

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>

ยง

impl<T> Mountable for Rc<RefCell<T>>
where T: Mountable,

ยง

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>

Implementorsยง

ยง

impl Mountable for AnyViewState

ยง

impl Mountable for AnyViewWithAttrsState

ยง

impl Mountable for ArcStrState

ยง

impl Mountable for CowStrState<'_>

ยง

impl Mountable for InertElementState

ยง

impl Mountable for InertElementState

ยง

impl Mountable for OcoStrState

ยง

impl Mountable for RcStrState

ยง

impl Mountable for StrState<'_>

ยง

impl Mountable for StringState

ยง

impl<A, B> Mountable for EitherKeepAliveState<A, B>
where A: Mountable, B: Mountable,

ยง

impl<A, B, C> Mountable for EitherOf3State<A, B, C>
where A: Render, B: Render, C: Render,

ยง

impl<A, B, C, D> Mountable for EitherOf4State<A, B, C, D>
where A: Render, B: Render, C: Render, D: Render,

ยง

impl<A, B, C, D, E> Mountable for EitherOf5State<A, B, C, D, E>
where A: Render, B: Render, C: Render, D: Render, E: Render,

ยง

impl<A, B, C, D, E, F> Mountable for EitherOf6State<A, B, C, D, E, F>
where A: Render, B: Render, C: Render, D: Render, E: Render, F: Render,

ยง

impl<A, B, C, D, E, F, G> Mountable for EitherOf7State<A, B, C, D, E, F, G>
where A: Render, B: Render, C: Render, D: Render, E: Render, F: Render, G: Render,

ยง

impl<A, B, C, D, E, F, G, H> Mountable for EitherOf8State<A, B, C, D, E, F, G, H>
where A: Render, B: Render, C: Render, D: Render, E: Render, F: Render, G: Render, H: Render,

ยง

impl<A, B, C, D, E, F, G, H, I> Mountable for EitherOf9State<A, B, C, D, E, F, G, H, I>
where A: Render, B: Render, C: Render, D: Render, E: Render, F: Render, G: Render, H: Render, I: Render,

ยง

impl<A, B, C, D, E, F, G, H, I, J> Mountable for EitherOf10State<A, B, C, D, E, F, G, H, I, J>
where A: Render, B: Render, C: Render, D: Render, E: Render, F: Render, G: Render, H: Render, I: Render, J: Render,

ยง

impl<A, B, C, D, E, F, G, H, I, J, K> Mountable for EitherOf11State<A, B, C, D, E, F, G, H, I, J, K>
where A: Render, B: Render, C: Render, D: Render, E: Render, F: Render, G: Render, H: Render, I: Render, J: Render, K: Render,

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L> Mountable for EitherOf12State<A, B, C, D, E, F, G, H, I, J, K, L>
where A: Render, B: Render, C: Render, D: Render, E: Render, F: Render, G: Render, H: Render, I: Render, J: Render, K: Render, L: Render,

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> Mountable for EitherOf13State<A, B, C, D, E, F, G, H, I, J, K, L, M>
where A: Render, B: Render, C: Render, D: Render, E: Render, F: Render, G: Render, H: Render, I: Render, J: Render, K: Render, L: Render, M: Render,

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> Mountable for EitherOf14State<A, B, C, D, E, F, G, H, I, J, K, L, M, N>
where A: Render, B: Render, C: Render, D: Render, E: Render, F: Render, G: Render, H: Render, I: Render, J: Render, K: Render, L: Render, M: Render, N: Render,

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> Mountable for EitherOf15State<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
where A: Render, B: Render, C: Render, D: Render, E: Render, F: Render, G: Render, H: Render, I: Render, J: Render, K: Render, L: Render, M: Render, N: Render, O: Render,

ยง

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Mountable for EitherOf16State<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>
where A: Render, B: Render, C: Render, D: Render, E: Render, F: Render, G: Render, H: Render, I: Render, J: Render, K: Render, L: Render, M: Render, N: Render, O: Render, P: Render,

ยง

impl<At, Ch> Mountable for ElementState<At, Ch>

ยง

impl<K, VFS, V> Mountable for KeyedState<K, VFS, V>
where K: Eq + Hash + 'static, VFS: Fn(usize), V: Render,

ยง

impl<M> Mountable for RenderEffect<M>
where M: Mountable + 'static,

ยง

impl<M, E> Mountable for Result<M, E>
where M: Mountable,

ยง

impl<T> Mountable for Option<T>
where T: Mountable,

ยง

impl<T> Mountable for OwnedViewState<T>
where T: Mountable,

ยง

impl<T> Mountable for RenderEffectState<T>
where T: Mountable,

ยง

impl<T> Mountable for ResultState<T>
where T: Render,

ยง

impl<T> Mountable for StaticVecState<T>
where T: Mountable,

ยง

impl<T> Mountable for SuspendState<T>
where T: Render,

ยง

impl<T> Mountable for VecState<T>
where T: Mountable,

ยง

impl<T, const N: usize> Mountable for ArrayState<T, N>
where T: Mountable,