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§
Sourcefn subscribe_events(
&self,
filter: EventFilter,
) -> Box<dyn Stream<Item = IotaEvent> + Send + Unpin>
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)
impl EventSubscriber for ()
No-op implementation for unit type (used in tests and when event subscription is not needed)