Struct dioxus_web::WebsysRenderer [−][src]
The WebsysRenderer provides a way of rendering a Dioxus Virtual DOM to the browser’s DOM.
Under the hood, we leverage WebSys and interact directly with the DOM
Implementations
impl WebsysRenderer[src]
pub async fn start(root: FC<()>)[src]
This method is the primary entrypoint for Websys Dioxus apps. Will panic if an error occurs while rendering. See DioxusErrors for more information on how these errors could occour.
fn main() { wasm_bindgen_futures::spawn_local(WebsysRenderer::start(Example)); }
Run the app to completion, panicing if any error occurs while rendering. Pairs well with the wasm_bindgen async handler
pub fn new(root: FC<()>) -> Self[src]
Create a new instance of the Dioxus Virtual Dom with no properties for the root component.
This means that the root component must either consumes its own context, or statics are used to generate the page. The root component can access things like routing in its context.
pub fn new_with_props<T: 'static>(root: FC<T>, root_props: T) -> 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(dom: VirtualDom) -> Self[src]
Create a new text renderer from an existing Virtual DOM.
pub async fn run(&mut self) -> Result<()>[src]
Auto Trait Implementations
impl !RefUnwindSafe for WebsysRenderer
impl !Send for WebsysRenderer
impl !Sync for WebsysRenderer
impl Unpin for WebsysRenderer
impl !UnwindSafe for WebsysRenderer
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,
pub 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.
pub 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>,