summaryrefslogblamecommitdiffstats
path: root/native/src/subscription/events.rs
blob: 6ff2c0fb593e112a018e89a2f98e150c005d82a0 (plain) (tree)
1
2
3
4
5
6
7
8






                                        
                                       














                                                            
use crate::{
    subscription::{EventStream, Recipe},
    Event, Hasher,
};

pub struct Events;

impl Recipe<Hasher, Event> for Events {
    type Output = Event;

    fn hash(&self, state: &mut Hasher) {
        use std::hash::Hash;

        std::any::TypeId::of::<Self>().hash(state);
    }

    fn stream(
        self: Box<Self>,
        event_stream: EventStream,
    ) -> futures::stream::BoxStream<'static, Self::Output> {
        event_stream
    }
}