Module pub_sub

Source
Expand description

Publish–subscribe pattern.

This is a generic implementation for [NUT-17(https://github.com/cashubtc/nuts/blob/main/17.md) with a type agnostic Publish-subscribe manager.

The manager has a method for subscribers to subscribe to events with a generic type that must be converted to a vector of indexes.

Events are also generic that should implement the Indexable trait.

Structs§

ActiveSubscription
Active Subscription
Index
Index
Manager
Subscription manager
SubId
Subscription Id wrapper
SubscriptionGlobalId
Dummy type

Constants§

DEFAULT_CHANNEL_SIZE
Default channel size for subscription buffering
DEFAULT_REMOVE_SIZE
Default size of the remove channel

Traits§

Indexable
Indexable trait