Trait dioxus_liveview::LiveviewRouter
source · pub trait LiveviewRouter {
// Required methods
fn create_default_liveview_router() -> Self;
fn with_virtual_dom(
self,
route: &str,
app: impl Fn() -> VirtualDom + Send + Sync + 'static
) -> Self;
fn start(self, address: impl Into<SocketAddr>) -> impl Future<Output = ()>;
// Provided method
fn with_app(self, route: &str, app: fn() -> Element) -> Self
where Self: Sized { ... }
}Expand description
A trait for servers that can be used to host a LiveView app.
Required Methods§
sourcefn create_default_liveview_router() -> Self
fn create_default_liveview_router() -> Self
Create a new router.
sourcefn with_virtual_dom(
self,
route: &str,
app: impl Fn() -> VirtualDom + Send + Sync + 'static
) -> Self
fn with_virtual_dom( self, route: &str, app: impl Fn() -> VirtualDom + Send + Sync + 'static ) -> Self
Add a liveview route to the server from a virtual dom.
Provided Methods§
Object Safety§
This trait is not object safe.