TestableSubscriberOptions
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public struct TestableSubscriberOptions
Options for the defining the behavior of a TestableSubscriber throughout its lifetime
-
The demand that will be signalled to the upstream
Publisherupon subscriptionDeclaration
Swift
public var initialDemand: Subscribers.Demand -
The demand that will be signalled to the upstream
Publisherwhen the initial demand is depletedDeclaration
Swift
public var subsequentDemand: Subscribers.Demand -
When demand has been depleted, the delay in virtual time before additional demand (amount determined by `.subsequentDemand) is signalled to the upstream publisher.
Declaration
Swift
public var demandReplenishmentDelay: VirtualTimeInterval -
An action to perform when a publisher produces a greater number of elements than the subscriber has signalled demand for. The default is an assertion failure.
Declaration
Swift
public var negativeBalanceHandler: (() -> Void)? -
Pre-populated
TestableSubscriberoptions:The defaults are:
initialDemand:.unlimitedsubsequentDemand:.nonedemandReplenishmentDelay:100negativeBalanceHandler:nil
Declaration
Swift
public static let `default`: TestableSubscriberOptions
View on GitHub
TestableSubscriberOptions Structure Reference