Trait EventSubscriber

Source
pub trait EventSubscriber: Send + Sync {
    // Required method
    fn subscribe_events(
        &self,
        filter: EventFilter,
    ) -> Box<dyn Stream<Item = IotaEvent> + Send + Unpin>;
}
Expand description

Trait for subscribing to event streams (used by gRPC service)

Required Methods§

Source

fn subscribe_events( &self, filter: EventFilter, ) -> Box<dyn Stream<Item = IotaEvent> + Send + Unpin>

Subscribe to events with the given filter

Implementations on Foreign Types§

Source§

impl EventSubscriber for ()

No-op implementation for unit type (used in tests and when event subscription is not needed)

Source§

fn subscribe_events( &self, _filter: EventFilter, ) -> Box<dyn Stream<Item = IotaEvent> + Send + Unpin>

Implementors§