pub trait EventSource<EVT: Send + Sync + 'static> {
// Required method
fn event_stream(&self) -> EventStream<EVT>;
}Expand description
Standartized interface for structures providing sream of events of specified type.
Typically this trait is implemented like this:
struct NumericSource {
stream: EventStreams<usize>
}
impl EventSource<usize> for NumericSource {
fn event_stream(&self) -> EventStream<usize> {
self.stream.create_event_stream()
}
}