Struct dioxus_webview::WebviewRenderer[][src]

pub struct WebviewRenderer<T> { /* fields omitted */ }

The WebviewRenderer provides a way of rendering a Dioxus Virtual DOM through a bridge to a Webview instance. Components used in WebviewRenderer instances can directly use system libraries, access the filesystem, and multithread with ease.

Implementations

impl<T: 'static> WebviewRenderer<T>[src]

pub fn run(
    root: FC<T>,
    props: T,
    user_builder: impl FnOnce(DioxusWebviewBuilder<'_>) -> DioxusWebviewBuilder<'_>
) -> Result<()>
[src]

pub fn new(
    root: FC<T>,
    builder: impl FnOnce() -> WVResult<WebView<'static, ()>>
) -> Self
[src]

Create a new text-renderer instance from a functional component root. Automatically progresses the creation of the VNode tree to completion.

A VDom is automatically created. If you want more granular control of the VDom, use from_vdom

pub fn from_vdom() -> Self[src]

Create a new text renderer from an existing Virtual DOM. This will progress the existing VDom’s events to completion.

pub fn update(&mut self, new_val: T)[src]

Pass new args to the root function

pub fn update_mut(&mut self, modifier: impl Fn(&mut T))[src]

Modify the root function in place, forcing a re-render regardless if the props changed

Auto Trait Implementations

impl<T> RefUnwindSafe for WebviewRenderer<T>

impl<T> Send for WebviewRenderer<T>

impl<T> Sync for WebviewRenderer<T>

impl<T> Unpin for WebviewRenderer<T>

impl<T> UnwindSafe for WebviewRenderer<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.