Skip to main content

Mountable

Trait Mountable 

Source
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§

Source

fn unmount(&mut self)

Detaches the view from the DOM.

Source

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

Mounts a node to the interface.

Source

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

Source

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

wip

Provided Methods§

Source

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.

Source

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§

Source§

impl Mountable for ()

Source§

fn unmount(&mut self)

Source§

fn mount(&mut self, _parent: &Element, _marker: Option<&Node>)

Source§

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

Source§

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

Source§

impl Mountable for Comment

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl Mountable for Element

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

impl Mountable for Node

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl Mountable for Text

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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)

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn unmount(&mut self)

Source§

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

Source§

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

Source§

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

Implementors§

Source§

impl Mountable for tachys::html::InertElementState

Source§

impl Mountable for OcoStrState

Source§

impl Mountable for tachys::svg::InertElementState

Source§

impl Mountable for AnyViewState

Source§

impl Mountable for AnyViewWithAttrsState

Source§

impl Mountable for ArcStrState

Source§

impl Mountable for CowStrState<'_>

Source§

impl Mountable for RcStrState

Source§

impl Mountable for StrState<'_>

Source§

impl Mountable for StringState

Source§

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

Source§

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

Source§

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

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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