Struct dioxus::prelude::LaunchBuilder
source · pub struct LaunchBuilder<Cfg: 'static = (), ContextFn: ?Sized = dyn Fn() -> Box<dyn Any> + 'static> { /* private fields */ }
Available on crate feature
launch
only.Expand description
A builder for a fullstack app.
Implementations§
source§impl LaunchBuilder
impl LaunchBuilder
sourcepub fn new() -> LaunchBuilder<(), dyn Fn() -> Box<dyn Any> + 'static>
pub fn new() -> LaunchBuilder<(), dyn Fn() -> Box<dyn Any> + 'static>
Create a new builder for your application. This will create a launch configuration for the current platform based on the features enabled on the dioxus
crate.
sourcepub fn custom<Cfg, List>(
launch_fn: LaunchFn<Cfg, List>
) -> LaunchBuilder<Cfg, List>
pub fn custom<Cfg, List>( launch_fn: LaunchFn<Cfg, List> ) -> LaunchBuilder<Cfg, List>
Provide a custom launch function for your application.
Useful for third party renderers to tap into the launch builder API without having to reimplement it.
source§impl<Cfg> LaunchBuilder<Cfg, dyn Fn() -> Box<dyn Any> + 'static>
impl<Cfg> LaunchBuilder<Cfg, dyn Fn() -> Box<dyn Any> + 'static>
sourcepub fn with_context_provider(
self,
state: impl Fn() -> Box<dyn Any> + 'static
) -> Self
pub fn with_context_provider( self, state: impl Fn() -> Box<dyn Any> + 'static ) -> Self
Inject state into the root component’s context that is created on the thread that the app is launched on.
sourcepub fn with_context(self, state: impl Any + Clone + 'static) -> Self
pub fn with_context(self, state: impl Any + Clone + 'static) -> Self
Inject state into the root component’s context.
Auto Trait Implementations§
impl<Cfg, ContextFn: ?Sized> Freeze for LaunchBuilder<Cfg, ContextFn>where
Cfg: Freeze,
impl<Cfg, ContextFn: ?Sized> RefUnwindSafe for LaunchBuilder<Cfg, ContextFn>where
Cfg: RefUnwindSafe,
ContextFn: RefUnwindSafe,
impl<Cfg, ContextFn: ?Sized> Send for LaunchBuilder<Cfg, ContextFn>
impl<Cfg, ContextFn: ?Sized> Sync for LaunchBuilder<Cfg, ContextFn>
impl<Cfg, ContextFn: ?Sized> Unpin for LaunchBuilder<Cfg, ContextFn>where
Cfg: Unpin,
impl<Cfg, ContextFn: ?Sized> UnwindSafe for LaunchBuilder<Cfg, ContextFn>where
Cfg: UnwindSafe,
ContextFn: UnwindSafe,
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.
source§impl<Cfg> TryIntoConfig for Cfg
impl<Cfg> TryIntoConfig for Cfg
source§fn into_config(self) -> Option<Cfg>
fn into_config(self) -> Option<Cfg>
Available on crate feature
launch
only.