Support event subscriptions in iced_web
Also improves the overall web runtime, avoiding nested update loops.
This commit is contained in:
parent
f5186f31f1
commit
6d46833eb2
12 changed files with 112 additions and 129 deletions
|
|
@ -1,8 +1,7 @@
|
|||
use crate::Subscription;
|
||||
|
||||
use futures::{future::BoxFuture, sink::Sink};
|
||||
use std::collections::HashMap;
|
||||
use std::marker::PhantomData;
|
||||
use futures::{channel::mpsc, future::BoxFuture, sink::Sink};
|
||||
use std::{collections::HashMap, marker::PhantomData};
|
||||
|
||||
/// A registry of subscription streams.
|
||||
///
|
||||
|
|
@ -64,7 +63,7 @@ where
|
|||
where
|
||||
Message: 'static + Send,
|
||||
Receiver: 'static
|
||||
+ Sink<Message, Error = core::convert::Infallible>
|
||||
+ Sink<Message, Error = mpsc::SendError>
|
||||
+ Unpin
|
||||
+ Send
|
||||
+ Clone,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue