use crate::{Event, Hasher}; pub type Subscription = iced_core::Subscription; pub type Input = futures::channel::mpsc::Receiver; pub use iced_core::subscription::Recipe; pub fn events() -> Subscription { Subscription::from_recipe(Events) } struct Events; impl Recipe for Events { type Output = Event; fn hash(&self, state: &mut Hasher) { use std::hash::Hash; std::any::TypeId::of::().hash(state); } fn stream( self: Box, input: Input, ) -> futures::stream::BoxStream<'static, Self::Output> { use futures::StreamExt; input.boxed() } }