-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: subscription type #175
Conversation
separately, sooner or later we want a stream type: https://docs.rs/tokio-stream/latest/tokio_stream/wrappers/struct.BroadcastStream.html |
yeah, I was considering implementing these as streams, but there's an upcoming conflict between Unpin/projection and Drop impl for RAII guards I think? |
basically need to figure out https://docs.rs/pin-project/latest/pin_project/attr.pinned_drop.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of these make sense to me.
having a new type is better than dealing with receiver, so we can add functions as we like
Adds the following types:
RawSubscription
SubscriptionItem<T>
Subscription<T>
Motivation
Lay groundwork for RAII subscriptions and subscription configuration.
Solution
Add
Subscription
type around the rawtokio::broadcast::Receiver
PR Checklist