dioxus_liveview/adapters/
mod.rsuse std::future::Future;
use dioxus_core::{Element, VirtualDom};
#[cfg(feature = "axum")]
pub mod axum_adapter;
#[cfg(feature = "axum")]
pub use axum_adapter::*;
pub trait LiveviewRouter {
fn create_default_liveview_router() -> Self;
fn with_app(self, route: &str, app: fn() -> Element) -> Self
where
Self: Sized,
{
self.with_virtual_dom(route, move || VirtualDom::new(app))
}
fn with_virtual_dom(
self,
route: &str,
app: impl Fn() -> VirtualDom + Send + Sync + 'static,
) -> Self;
fn start(self, address: impl Into<std::net::SocketAddr>) -> impl Future<Output = ()>;
}