mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 20:53:06 +00:00
features don't play nice with vscode development
This commit is contained in:
parent
4b3d200c0d
commit
3b45edacc0
1 changed files with 14 additions and 6 deletions
|
@ -10,17 +10,25 @@ impl crate::Liveview {
|
||||||
pub async fn upgrade(&self, ws: warp::ws::WebSocket, app: fn(Scope) -> Element) {
|
pub async fn upgrade(&self, ws: warp::ws::WebSocket, app: fn(Scope) -> Element) {
|
||||||
connect(ws, self.pool.clone(), app, ()).await;
|
connect(ws, self.pool.clone(), app, ()).await;
|
||||||
}
|
}
|
||||||
pub async fn upgrade_with_props<T>(&self, ws: warp::ws::WebSocket, app: fn(Scope<T>) -> Element, props: T)
|
pub async fn upgrade_with_props<T>(
|
||||||
where
|
&self,
|
||||||
T: Send + Sync + 'static
|
ws: warp::ws::WebSocket,
|
||||||
|
app: fn(Scope<T>) -> Element,
|
||||||
|
props: T,
|
||||||
|
) where
|
||||||
|
T: Send + Sync + 'static,
|
||||||
{
|
{
|
||||||
connect(ws, self.pool.clone(), app, props).await;
|
connect(ws, self.pool.clone(), app, props).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn connect<T>(ws: WebSocket, pool: LocalPoolHandle, app: fn(Scope<T>) -> Element, props: T)
|
pub async fn connect<T>(
|
||||||
where
|
ws: WebSocket,
|
||||||
T: Send + Sync+ 'static
|
pool: LocalPoolHandle,
|
||||||
|
app: fn(Scope<T>) -> Element,
|
||||||
|
props: T,
|
||||||
|
) where
|
||||||
|
T: Send + Sync + 'static,
|
||||||
{
|
{
|
||||||
// Use a counter to assign a new unique ID for this user.
|
// Use a counter to assign a new unique ID for this user.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue