[−][src]Struct dodrio::Vdom
A strong handle to a mounted virtual DOM.
When this handle is dropped, the virtual DOM is unmounted and its listeners
removed. To keep it mounted forever, use the Vdom::forget
method.
Implementations
impl Vdom
[src]
pub fn new<R>(container: &Element, component: R) -> Vdom where
R: RootRender,
[src]
R: RootRender,
Mount a new Vdom
in the given container element with the given root
rendering component.
This will box the given component into trait object.
pub fn with_boxed_root_render(
container: &Element,
component: Box<dyn RootRender>
) -> Vdom
[src]
container: &Element,
component: Box<dyn RootRender>
) -> Vdom
Construct a Vdom
with the already-boxed-as-a-trait-object root
rendering component.
pub fn forget(self)
[src]
Run this virtual DOM and its listeners forever and never unmount it.
pub fn weak(&self) -> VdomWeak
[src]
Get a weak handle to this virtual DOM.
pub fn unmount(self) -> Box<dyn RootRender>
[src]
Unmount this virtual DOM, unregister its event listeners, and return its root render component.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Vdom
impl !Send for Vdom
impl !Sync for Vdom
impl Unpin for Vdom
impl !UnwindSafe for Vdom
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,