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
Publisher
upon subscriptionDeclaration
Swift
public var initialDemand: Subscribers.Demand
-
The demand that will be signalled to the upstream
Publisher
when 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
TestableSubscriber
options:The defaults are:
initialDemand
:.unlimited
subsequentDemand
:.none
demandReplenishmentDelay
:100
negativeBalanceHandler
:nil
Declaration
Swift
public static let `default`: TestableSubscriberOptions