Skip to content

Instantly share code, notes, and snippets.

@jasdev
Last active April 17, 2020 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasdev/bab7184c5c2e689891f047730085c782 to your computer and use it in GitHub Desktop.
Save jasdev/bab7184c5c2e689891f047730085c782 to your computer and use it in GitHub Desktop.
Focusing in on `ReplaySubject.Subscription`.
final class ReplaySubject<Output, Failure: Error>: Subject { /* … */ }
extension ReplaySubject {
final class Subscription<Subscriber: Combine.Subscriber>: Combine.Subscription
where Subscriber.Input == Output, Subscriber.Failure == Failure {
init(subscriber: Subscriber) { /* … */ }
func request(_ demand: Subscribers.Demand) { /* … */ }
func cancel() { /* … */ }
func forward(completion: Subscribers.Completion<Failure>) { /* … */ }
func forward(value: Output) { /* … */ }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment