Struct dioxus_web::Config
source · pub struct Config { /* private fields */ }
Expand description
Implementations§
source§impl Config
impl Config
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new Default instance of the Config.
This is no different than calling Config::default()
sourcepub fn rootname(self, name: impl Into<String>) -> Self
pub fn rootname(self, name: impl Into<String>) -> Self
Set the name of the element that Dioxus will use as the root.
This is akin to calling React.render() on the element with the specified name.
Note that this only works on the current document, i.e. window.document
.
To use a different document (popup, iframe, …) use Self::rootelement instead.
sourcepub fn rootelement(self, elem: Element) -> Self
pub fn rootelement(self, elem: Element) -> Self
Set the element that Dioxus will use as root.
This is akin to calling React.render() on the given element.
sourcepub fn with_default_panic_hook(self, f: bool) -> Self
pub fn with_default_panic_hook(self, f: bool) -> Self
Set whether or not Dioxus should use the built-in panic hook or defer to your own.
The panic hook is set to true normally so even the simplest apps have helpful error messages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl !Send for Config
impl !Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.