ReplaySubject
public final class ReplaySubject<Output, Failure> : Subject where Failure : Error
The ShareReplay is used to share a single subscription to the upstream publisher and replay items emitted by that one.
-
Initialize a
ReplaySubjectsubject with a buffer sizeDeclaration
Swift
public init(_ bufferSize: Int = 0) -
Provides this Subject an opportunity to establish demand for any new upstream subscriptions
Declaration
Swift
public func send(subscription: Subscription) -
Sends a value to the subscriber.
Declaration
Swift
public func send(_ value: Output) -
Sends a completion signal to the subscriber.
Declaration
Swift
public func send(completion: Subscribers.Completion<Failure>) -
This function is called to attach the specified
Subscriberto the`PublisherDeclaration
Swift
public func receive<Downstream>(subscriber: Downstream) where Output == Downstream.Input, Failure == Downstream.Failure, Downstream : Subscriber
View on GitHub
ReplaySubject Class Reference