DatasyncSubscription

public final class DatasyncSubscription : Hashable, CustomStringConvertible, CustomDebugStringConvertible

An object representing a subscription to Datasync events.

Instances are created by the DatasyncNode.subscribe(to:childrenConstraint:stores:file:line:queue:onEvent:onCompletion:) method.

A subscription is cancelled:

Stored Properties

API

  • The constraint to filter children used to take the subscription.

    This value corresponds to the childrenConstraint parameter of the DatasyncNode.subscribe(to:childrenConstraint:stores:file:line:queue:onEvent:onCompletion:) method call used to subscribe.

    Declaration

    Swift

    public var childrenConstraint: DatasyncChildrenConstraint { get }
  • Cancels this subscription.

    It is safe canceling the same subscription several times. Canceling an already-cancelled subscription is a no-operation.

    Depending on the DatasyncManager.subscriptionCancellationPolicy, the SDK can continue to silently maintain up-to-date the cache for that subscription.

    Declaration

    Swift

    @discardableResult
    public func cancel() -> Bool

    Return Value

    true if the subscription has been cancelled by this call, false if it had already been cancelled before.

Equatable Protocol

  • Declaration

    Swift

    public static func == (left: DatasyncSubscription, right: DatasyncSubscription) -> Bool

Hashable Protocol

  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)

CustomStringConvertible Protocol

  • Declaration

    Swift

    public var description: String { get }

CustomDebugStringConvertible Protocol

  • Declaration

    Swift

    public var debugDescription: String { get }