-
-
Save jasdev/be106d7a1ad9668cd6a6ea58ff90fb3c to your computer and use it in GitHub Desktop.
`ReplaySubject` start.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final class ReplaySubject: Subject { | |
typealias Output = /* … */ /// (1) The `Subject` itself won’t know its `Output` and `Failure` types, | |
/// but callers will. So, we can add generics for the two, following `PassthroughSubject` and | |
/// `CurrentValueSubject`’s lead. | |
typealias Failure = /* … */ /// (2) Same as in `(1)`. | |
private let bufferSize: Int | |
init(bufferSize: Int) { | |
self.bufferSize = bufferSize | |
} | |
func send(subscription: Subscription) { /* … */ } | |
func send(completion: Subscribers.Completion<Failure>) { /* … */ } | |
func send(_ value: Output) { /* … */ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment