SubscriptionType
public protocol SubscriptionType
Abstraction over subscription types from reactive frameworks. This abstraction uses concept similar to type-erasure or protocol witness pattern, wrapping the behaviour of concrete implementations and delegating to them once the wrapper funcions are called.
-
Stops the observation and clean up all resources
Declaration
Swift
func unsubscribe()
-
cancelled(by:
Extension method) Allow to add a subscription to a subscription collection, which is an abstraction for
DisposeBag
orSet<AnyCancellable
depending on your chosen reactive frameworkDeclaration
Swift
public func cancelled<SC>(by subscriptionCollection: inout SC) where SC : SubscriptionCollection
Parameters
subscriptionCollection
an abstraction for
DisposeBag
orSet<AnyCancellable
depending on your chosen reactive framework -
cancelled(by:
Extension method) Allow to add a subscription to a subscription collection, which is an abstraction for
DisposeBag
orSet<AnyCancellable
depending on your chosen reactive frameworkDeclaration
Swift
public func cancelled(by subscriptionCollection: inout SubscriptionCollection)
Parameters
subscriptionCollection
a mutable abstraction for
DisposeBag
orSet<AnyCancellable
depending on your chosen reactive framework