DatasyncNode

public final class DatasyncNode : Hashable, CustomStringConvertible
extension DatasyncNode: WebcomCombinable

An object that represents a reference to a database node.

By abuse of language, the node reference is sometimes assimilate with the referred node itself. This does not usually preclude understanding. Just keep in mind that there may be several references for the same database node.

From a theoretical point of view, all nodes always exist: the concept on existence is a nonsense. From a practical point of view, we often consider that a node exists when its value is not null (the JSON null value, not to be confused with the Swift nil keyword).

Instances are typically created using:

A node reference always belongs to the DatasyncManager from which it was created. A node reference created from another node reference belongs to the same manager as the latter. A node reference obtained from an event belongs to the same manager as the node that subscribes to that event. Furthermore, this DatasyncManager instance derives from a WebcomApplication instance.

API

  • The JavaScript reference that this instance refers to

    Declaration

    Swift

    public var serverlessDbNode: JSValue? { get }
  • The DataNode instance that refers the same node as this instance.

    Declaration

    Swift

    public var dataNode: DataNode { get }
  • The absolute path of the node referred by this instance.

    The path consists of the keys of the ancestors of this node, starting from the root of the tree, separated by / (slash) characters. The last segment of the path is the key of this node. The before last segment of the path, if any, is the key of the parent of this node. The path always begins with a /. The path of the root node is "/".

    Declaration

    Swift

    public var path: String { get }
  • key

    The key of the node represented by this instance.

    It corresponds to the last segment of the path. It does not contain any / (slash) character. The key of the root node is the empty string ("").

    Declaration

    Swift

    public var key: WebcomKey { get }
  • Returns a reference to the parent of the node referred by this instance.

    This method behaves like the parent property, with the difference it throws instead of returning nil.

    Note: With a reference to the root node, relativeNodeThrows(for: "..") returns a reference to the root node.

    Throws

    A WebcomError value when this node is the root node.

    Declaration

    Swift

    public func parentThrows() throws -> DatasyncNode
  • A reference to the parent of the node referred by this instance.

    The root node does not have a parent, so this property returns nil for the root node. For all other nodes, this property never returns nil.

    Note: With a reference to the root node, relativeNode(for: "..") returns a reference to the root node.

    Declaration

    Swift

    public var parent: DatasyncNode? { get }
  • Returns a reference to another node, relatively to the node referred by this instance.

    This method behaves like the relativeNode(for:) method, with the difference it throws instead of returning nil.

    Throws

    A WebcomError value when the path is syntactically not valid.

    Declaration

    Swift

    public func relativeNodeThrows(for path: String) throws -> DatasyncNode

    Parameters

    path

    The relative path of the node to refer.

    Return Value

    A reference to the node corresponding to the relative path when it is valid.

  • Returns a reference to another node, relatively to the node referred by this instance.

    This method only returns nil when the path is ill-formed, that is when it contains forbidden characters. All nodes always exists: this method always returns a plain node reference when the path is syntactically valid.

    The path consists of segments separated by / (slash) characters. Each segment corresponds to a move in the database tree:

    • The starting point is the node corresponding to this instance.
    • The . segment is a no-operation.
    • The .. segment indicates to go one level up in the tree. When already at the root node, this is a no-operation.
    • The empty segment, when using a / at the beginning or at the end of the path, or when using several consecutive /, is a no-operation.
    • Any other valid segment indicates to go one level down towards the so-named child.

    If the path referred by this node is /foo/bar:

    • and path is equal to geek, /geek, geek/ or /geek/, the path of the resulting node is /foo/bar/geek,
    • and path is equal to ../geek/noob or /../geek//noob/. or ../geek/./noob/., the path of the resulting node is /foo/geek/noob,
    • and path is equal to ../geek/../..//../.., the resulting node is the root node.

    Note: With a reference to the root node, parent returns nil.

    Declaration

    Swift

    public func relativeNode(for path: String) -> DatasyncNode?

    Parameters

    path

    The relative path of the node to refer. It can start or not with a / (slash) character. It is always relative.

    Return Value

    A reference to the node corresponding to the relative path when it is valid, nil otherwise.

  • Returns a reference to a database node, relatively to a base node.

    This operator returns:

    node.relativeNode(for: path)
    

    Declaration

    Swift

    public static func / (node: DatasyncNode, path: String) -> DatasyncNode?

    Parameters

    node

    A reference to the base node.

    path

    The relative path of the node to refer. It can start or not with a / (slash) character. It is always relative.

    Return Value

    A node reference when the path is valid, nil otherwise.

  • Creates a reference to a new child of the node referred by this instance.

    The key of the new child is a unique identifier based on a timestamp. Such a key is also called a push identifier. The keys of several children created with this method are ordered chronologically. With this method, several users can add children to the same data node of a database at the same time without any write conflict.

    Note: More exactly, since from a theoretical point of view all nodes always exist, this method actually returns a reference to a node whose current value is JSON null.

    Declaration

    Swift

    public func createChild() -> DatasyncNode

    Return Value

    A reference to a new child of this node.

  • Gets the value of the node referred by this instance.

    The value is not returned synchronously, but a callback is called asynchronously with the value as its parameter.

    The decodedValue(queue:then:) method can be used to get decoded values.

    Declaration

    Swift

    public func value(queue: DispatchQueue? = nil, then completionCallback: @escaping WebcomResult<DatasyncValue>.Callback)

    Parameters

    queue

    The queue to which the provided callback dispatches. When nil, the default callback queue of the manager of this instance is used.

    completionCallback

    The closure to call upon completion. In case of success, it is called with the current value of the referred node. In case of failure, it is called with a WebcomError value indicating the reason of the failure.

  • Gets the value of the node referred by this instance.

    The value is not returned synchronously, but a callback is called asynchronously with the value as its parameter.

    This method behaves like the value(queue:then:) method with a callback that receives a decoded value in case of success. When the value cannot be decoded, the completionCallback is called with an error having the WebcomError.SDKCode.decodingFailed code. If this behavior does not fit your needs, use the value(queue:then:) method and process the callback parameter as expected.

    The decoding is done using the WebcomApplication.jsonDecoder of the WebcomApplication from which this node derives.

    Declaration

    Swift

    public func decodedValue<T>(queue: DispatchQueue? = nil, then completionCallback: @escaping WebcomResult<T>.Callback) where T : Decodable

    Parameters

    queue

    The queue to which the provided callback dispatches. When nil, the default callback queue of the manager of this instance is used.

    completionCallback

    The closure to call upon completion. In case of success, it is called with the decoded current value of the referred node. In case of failure, it is called with a WebcomError value indicating the reason of the failure.

  • The value of the node referred by this instance from the cache.

    When there is no value available in the cache, the returned value is null (not to be confused with the Swift nil keyword).

    In general, to get the value of a node, it is preferable to use the value(queue:then:) method.

    Declaration

    Swift

    public var cacheValue: DatasyncValue { get }
  • Gets the content of the cache on the current node.

    Declaration

    Swift

    public func getCache(with constraint: DatasyncChildrenConstraint = .all) -> DatasyncValue?

    Parameters

    constraint

    If specified, filters the result by applying the constraint The time at which to perform the operation.

  • Clears the value of the node referred by this instance.

    Clearing the value is equivalent to setting a JSON null value. Therefore, calling this method is equivalent to call:

    set(nil, at: time, queue: queue, then: completionCallback)
    

    Declaration

    Swift

    public func clear(at time: DatasyncTime = .now, queue: DispatchQueue? = nil, then completionCallback: WebcomResult<Void>.Callback? = nil)

    Parameters

    time

    The time at which to perform the operation.

    queue

    The queue to which the provided callback dispatches. When nil, the default callback queue of the manager of this instance is used.

    completionCallback

    The closure to call upon completion. In case of success, it is called with a void value. In case of failure, it is called with a WebcomError value indicating the reason of the failure.

  • Sets the value of the node referred by this instance.

    Note: In most cases, you should rather use the set(_:at:queue:then:) overload that takes an Encodable parameter.

    All children of the referred node cleared before setting the new value. The merge(_:with:at:queue:then:) method may be used to merge existing children with the ones of the value when it is a JSON object or array.

    Declaration

    Swift

    public func set(_ raw: WebcomMarkers.Raw, _ json: Any?, at time: DatasyncTime = .now, queue: DispatchQueue? = nil, then completionCallback: WebcomResult<Void>.Callback? = nil)

    Parameters

    raw

    Use the .raw value to disambiguate with the set(_:at:queue:then:) overload that takes an Encodable parameter.

    json

    The value to set. It must be valid JSON (object, array, string, number, boolean or null). The null value can be specified with nil or NSNull().

    time

    The time at which to perform the operation.

    queue

    The queue to which the provided callback dispatches. When nil, the default callback queue of the manager of this instance is used.

    completionCallback

    The closure to call upon completion. In case of success, it is called with a void value. In case of failure, it is called with a WebcomError value indicating the reason of the failure.

  • Sets the value of the node referred by this instance.

    All children of the referred node cleared before setting the new value. The merge(with:at:queue:then:) method may be used to merge existing children with the ones of the value when it is a JSON object or array.

    Declaration

    Swift

    public func set(_ value: (some Encodable)?, at time: DatasyncTime = .now, queue: DispatchQueue? = nil, then completionCallback: WebcomResult<Void>.Callback? = nil)

    Parameters

    value

    The value to set. It will be encoded to JSON before being sent to the back-end, using the WebcomApplication.jsonEncoder of the WebcomApplication from which this node derives. The null value can be specified with nil or NSNull().

    time

    The time at which to perform the operation.

    queue

    The queue to which the provided callback dispatches. When nil, the default callback queue of the manager of this instance is used.

    completionCallback

    The closure to call upon completion. In case of success, it is called with a void value. In case of failure, it is called with a WebcomError value indicating the reason of the failure.

  • Sets the value of a node.

    This operator is equivalent to:

    node.set(value)
    

    Declaration

    Swift

    public static func <- (node: DatasyncNode, value: (some Encodable)?)

    Parameters

    node

    A reference to the node whose value must be set.

    value

    The value to set.

  • Merges a value with the current value of the node referred by this instance.

    Note: In most cases, you should rather use the merge(with:at:queue:then:) overload that takes an Encodable parameter.

    Unlike what happens with the set(_:_:at:queue:then:):

    • json must be a valid JSON object,
    • existing direct children (i.e. the descendants at the first level of depth) that exist in the current value are preserved when json does not specify them.

    Declaration

    Swift

    public func merge(_ raw: WebcomMarkers.Raw, with json: [String : Any], at time: DatasyncTime = .now, queue: DispatchQueue? = nil, then completionCallback: WebcomResult<Void>.Callback? = nil)

    Parameters

    raw

    Use the .raw value to disambiguate with the merge(with:at:queue:then:) overload that takes an Encodable parameter.

    json

    The value to merge with. It must be a valid JSON object.

    time

    The time at which to perform the operation.

    queue

    The queue to which the provided callback dispatches. When nil, the default callback queue of the manager of this instance is used.

    completionCallback

    The closure to call upon completion. In case of success, it is called with a void value. In case of failure, it is called with a WebcomError value indicating the reason of the failure.

  • Merges a value with the current value of the node referred by this instance.

    Unlike what happens with the set(_:at:queue:then:):

    • value may not be nil,
    • the encoding of value to JSON must give a JSON object (or a JSON array but this is discouraged), or the method will fail,
    • existing direct children (i.e. the descendants at the first level of depth) that exist in the current value are preserved when value does not specify them.

    Declaration

    Swift

    public func merge(with value: some Encodable, at time: DatasyncTime = .now, queue: DispatchQueue? = nil, then completionCallback: WebcomResult<Void>.Callback? = nil)

    Parameters

    value

    The value to merge with. It will be encoded to JSON before being sent to the back-end, using the WebcomApplication.jsonEncoder of the WebcomApplication from which this node derives.

    time

    The time at which to perform the operation.

    queue

    The queue to which the provided callback dispatches. When nil, the default callback queue of the manager of this instance is used.

    completionCallback

    The closure to call upon completion. In case of success, it is called with a void value. In case of failure, it is called with a WebcomError value indicating the reason of the failure.

  • Adds a new child with the given value to the node referred by this instance.

    Note: In most cases, you should rather use the push(_:queue:then:) overload that takes an Encodable parameter.

    This method creates a new child to the referred node and then it sets its value.

    When this method returns nil, completionCallback is called in failure with a WebcomError value indicating the reason of the failure. It may well happen that this method returns a non-nil node reference and the completionCallback is called in failure, for example if a security rule prevents writing the child.

    Declaration

    Swift

    public func push(_ raw: WebcomMarkers.Raw, _ json: Any?, queue: DispatchQueue? = nil, then completionCallback: WebcomResult<DatasyncNode>.Callback? = nil)

    Parameters

    raw

    Use the .raw value to disambiguate with the push(_:queue:then:) overload that takes an Encodable parameter.

    json

    The value to set for the created child. It must be valid JSON (object, array, string, number, boolean or null). The null value can be specified with nil or NSNull().

    queue

    The queue to which the provided callback dispatches. When nil, the default callback queue of the manager of this instance is used.

    completionCallback

    The closure to call upon completion. In case of success, it is called with a reference to the added child. In case of failure, it is called with a WebcomError value indicating the reason of the failure.

  • Adds a new child with the given value to the node referred by this instance.

    This method creates a new child to the referred node and then it sets its value.

    When this method returns nil, completionCallback is called in failure with a WebcomError value indicating the reason of the failure. It may well happen that this method returns a non-nil node reference and the completionCallback is called in failure, for example if a security rule prevents writing the child.

    Declaration

    Swift

    public func push<T>(_ value: T?, queue: DispatchQueue? = nil, then completionCallback: WebcomResult<DatasyncNode>.Callback? = nil) where T : Encodable

    Parameters

    value

    The value to set for the created child. It will be encoded to JSON before being sent to the back-end, using the WebcomApplication.jsonEncoder of the WebcomApplication from which this node derives. The null value can be specified with nil or NSNull().

    queue

    The queue to which the provided callback dispatches. When nil, the default callback queue of the manager of this instance is used.

    completionCallback

    The closure to call upon completion. In case of success, it is called with a reference to the added child. In case of failure, it is called with a WebcomError value indicating the reason of the failure.

    Return Value

    A reference to the added child when the value in valid, nil otherwise.

  • Adds a new child to a node with the given value.

    This operator is equivalent to:

    node.push(value)
    

    Declaration

    Swift

    public static func += (node: DatasyncNode, value: (some Encodable)?)

    Parameters

    node

    A reference to the node to which a new child must be pushed.

    value

    The value to set for the created child.

  • Atomically increments (or decrements) the value of the node referred by this instance.

    When the node does not exist (in other words, when its initial value is null), the node is implicitly assumed having the startValue value and the increment step is added to that implicit value.

    When the node exists and its initial value is not a number, the operation fails.

    This operation is robust to concurrent increment operations. It is guaranteed that if n increment operations are performed at the same time, then the value of the node is incremented by n steps (in other words, none of the concurrent operations can overwrite another one).

    However, note that the returned value may not be synchronized with the actual value of the node, especially if other write operations are performed at the same time. You should rather use the subscribe(to:childrenConstraint:stores:file:line:queue:onEvent:onCompletion:) method to watch the actual value of the node.

    Declaration

    Swift

    public func increment(from startValue: NSNumber = 0, by step: NSNumber = 1, queue: DispatchQueue? = nil, then completionCallback: WebcomResult<NSNumber>.Callback? = nil)

    Parameters

    startValue

    The implicit initial value of the node when it does not exist.

    step

    The increment to add to the initial value to get the final value. To decrement, use a negative value.

    queue

    The queue to which the provided callback dispatches. When nil, the default callback queue of the manager of this instance is used.

    completionCallback

    The closure to call upon completion. In case of success, it is called with the resulting value of the increment operation. In case of failure, it is called with a WebcomError value indicating the reason of the failure.

  • Runs a transaction on the node referred by this instance.

    A transaction is a process that atomically sets a new value to the node depending on its initial value. In other words, the new value is computed from the initial value and it is sets only if the value of the node has not been modified in the meantime. If the value of the node just before setting the new value is no longer the initial value, then the transaction is run again.

    The transaction is specified with a function, which receives as its single parameter the initial value and returns an operation to execute. The operation may consist of setting a new value or clearing the value (which is equivalent to setting the null value). The operation may also indicate to abort the transaction.

    If the transaction consists in incrementing (or decrementing) the value of the referred node, you should rather use the increment(from:by:queue:then:) method which is more efficient in this case.

    Declaration

    Swift

    public func runTransaction(_ function: @escaping DatasyncTransaction.Function, queue: DispatchQueue? = nil, then completionCallback: WebcomResult<DatasyncTransaction.Result>.Callback? = nil)

    Parameters

    function

    The function that computes the operation to execute from the initial value of the node.

    queue

    The queue to which the provided completionCallback dispatches. When nil, the default callback queue of the manager of this instance is used. This parameter is not used to dispatch the function parameter.

    completionCallback

    The closure to call upon completion. In case of success, it is called with a value representing the result of the transaction. In case of failure, it is called with a WebcomError value indicating the reason of the failure.

  • Subscribes to events related to the value of the referred node.

    The decodedValueSubscribe(to:childrenConstraint:stores:file:line:queue:onValue:onCompletion:) method can be used to directly get decoded values.

    A subscription must always be stored somewhere in order to remain active. The easiest way is to let the DatasyncManager of the referred node store it by setting the stores parameter to true (which is its default value). Otherwise, the returned subscription instance must be stored by the application. Until a subscription is cancelled or revoked, it remains active and consumes resources.

    A subscription is cancelled:

    All subscriptions stored by a given DatasyncManager instance may also be cancelled explicitly at once using the DatasyncManager.unsubscribeFromAll() method.

    A subscription may also be revoked by the back-end if the authenticated user loses read permission at the referred node.

    To catch such a cancellation or revocation, use the completionCallback parameter.

    Important: Be careful with variables captured by the callback

    If this instance belongs to a manager that is stored in a view controller (which is a strongly encouraged practice), and the eventCallback needs to use a property or a method of that view controller (which is quite common), use a weak or an unowned reference for that view controller, to break the following retain cycle:

    view controller ---> manager ---> event callback
            ^                               |
            |                               |
            o---- use weak/unowned here ----o
    

    Declaration

    Swift

    @discardableResult
    public func subscribe(to eventType: DatasyncEventType = .valueChange, childrenConstraint: DatasyncChildrenConstraint = .all, stores: Bool = true, file: StaticString = #fileID, line: UInt = #line, queue: DispatchQueue? = nil, onEvent eventCallback: @escaping (_ event: DatasyncEvent) -> Void, onCompletion completionCallback: ((_ completion: DatasyncSubscriptionCompletion) -> Void)? = nil) -> DatasyncSubscription?

    Parameters

    eventType

    The type of events to subscribe.

    childrenConstraint

    A constraint to filter the children of the referred node that are affected by the subscription

    stores

    Indicates whether the returned subscription should be stored by the manager.

    file

    The file from which the method is called. This is used for debugging purposes.

    line

    The line from which the method is called. This is used for debugging purposes.

    queue

    The queue to which the provided eventCallback and completionCallback dispatch. When nil, the default callback queue of the manager of this instance is used.

    eventCallback

    The closure to call when the specified event occurs.

    event

    The event that occurred.

    completionCallback

    The closure to call when the subscription completes.

    completion

    A value representing how the subscription completed.

    Return Value

    An instance describing the subscription, or nil if the subscription failed.

  • Subscribes to events related to the value of the referred node.

    This method behaves like the subscribe(to:childrenConstraint:stores:file:line:queue:onEvent:onCompletion:) method with a callback that receives the decoded value brought by the event. When the value cannot be decoded, the decodedValueCallback is not called. Such a non-decodable value is simply ignored. If this behavior does not fit your needs, use the subscribe(to:childrenConstraint:stores:file:line:queue:onEvent:onCompletion:) method and process the event as expected.

    Declaration

    Swift

    @discardableResult
    public func decodedValueSubscribe<T>(to eventType: DatasyncEventType = .valueChange, childrenConstraint: DatasyncChildrenConstraint = .all, stores: Bool = true, file: StaticString = #fileID, line: UInt = #line, queue: DispatchQueue? = nil, onValue decodeValueCallback: @escaping (_ decodedValue: T) -> Void, onCompletion completionCallback: ((_ completion: DatasyncSubscriptionCompletion) -> Void)? = nil) -> DatasyncSubscription? where T : Decodable

    Parameters

    eventType

    The type of events to subscribe.

    childrenConstraint

    A constraint to filter the children of the referred node that are affected by the subscription.

    stores

    Indicates whether the returned subscription should be stored by the manager.

    file

    The file from which the method is called. This is used for debugging purposes.

    line

    The line from which the method is called. This is used for debugging purposes.

    queue

    The queue to which the provided decodeValueCallback and completionCallback dispatch. When nil, the default callback queue of the manager of this instance is used.

    decodeValueCallback

    The closure to call when the specified event occurs and the value can be decoded.

    decodedValue

    The value brought by the event that occurred.

    completionCallback

    The closure to call when the subscription completes.

    completion

    A value representing how the subscription completed.

    Return Value

    An instance describing the subscription, or nil if the subscription failed.

  • Creates a subscription that assigns the children of the referred node to a dictionary.

    In the dictionary:

    • the keys are the keys of the children, as returned by DatasyncEvent.key,
    • the values are decoded from the values of the children using DatasyncValue.decoded().

    This method uses an underlying subscription to follow children additions, changes and removals. The dictionary is updated each time an event is received for that subscription. If the value of an added or changed child could not be decoded, the corresponding element in the dictionary is removed. If the subscription is revoked by the back-end, the dictionary is cleared.

    Depending on stores, the subscription may be stored by the DatasyncManager of the referred node, as the subscribe(to:childrenConstraint:stores:file:line:queue:onEvent:onCompletion:) method does.

    To avoid a retain cycle, the subscription does not keep a strong reference on the object. The developer must ensure that its lifetime is at least as long as that of the subscription. This is the case when the dictionary and the DatasyncManager are stored in the same object, provided that stores is true.

    Example:

    class EmployeeDirectory {
    
        struct Employee: Decodable {
            let name: String
            let yearOfBirth: Int
        }
    
        let datasyncManager = Webcom.defaultApplication.datasyncService.createManager()
        var employees: [String: Employee] = [:]
    
        func assignEmployees() {
            let employeesNode = datasyncManager / "employees"
            employeesNode?.assignChildren(to: \.employees, on: self)
        }
    
        ...
    }
    

    Declaration

    Swift

    @discardableResult
    public func assignChildren<R, T>(to keyPath: ReferenceWritableKeyPath<R, [WebcomKey : T]>, on object: R, stores: Bool = true, queue: DispatchQueue? = nil, file: StaticString = #fileID, line: UInt = #line) -> DatasyncSubscription? where R : AnyObject, T : Decodable

    Parameters

    keyPath

    A key path that indicates the dictionary property to assign.

    object

    The object that contains the dictionary property to assign.

    stores

    Indicates whether the returned subscription should be stored by the manager.

    queue

    The queue to which dictionary updates are dispatched. When nil, the default callback queue of the manager of this instance is used.

    file

    The file from which the method is called. This is used for debugging purposes.

    line

    The line from which the method is called. This is used for debugging purposes.

    Return Value

    An instance describing the underlying subscription, or nil if the subscription failed.

  • Copies the value of the node referred by this instance to another node.

    All children of the destination node are cleared before setting its value.

    Declaration

    Swift

    public func copyValue(to destinationNode: DatasyncNode, queue: DispatchQueue? = nil, then completionCallback: WebcomResult<DatasyncValue>.Callback? = nil)

    Parameters

    destinationNode

    A reference to the node to set with the value of this node.

    queue

    The queue to which the provided callback dispatches. When nil, the default callback queue of the manager of this instance is used.

    completionCallback

    The closure to call upon completion. In case of success, it is called with the copied value. In case of failure, it is called with a WebcomError value indicating the reason of the failure.

  • Copies the value of the node referred by this instance to another node.

    All children of the destination node are cleared before setting its value.

    Declaration

    Swift

    public func copyValue(to destinationPath: String, queue: DispatchQueue? = nil, then completionCallback: WebcomResult<DatasyncValue>.Callback? = nil)

    Parameters

    destinationPath

    The path of the node to set with the value of this node.

    queue

    The queue to which the provided callback dispatches. When nil, the default callback queue of the manager of this instance is used.

    completionCallback

    The closure to call upon completion. In case of success, it is called with the copied value. In case of failure, it is called with a WebcomError value indicating the reason of the failure.

  • Cancels an operation registered using the DatasyncTime.nextDisconnection or DatasyncTime.onDisconnectionvalue for the node referred by this instance.

    If no operation is currently registered, this method has no effect. This method cannot cancel an operation that has already been performed by the back-end.

    Declaration

    Swift

    public func cancelNextDisconnectionAction(queue: DispatchQueue? = nil, then completionCallback: WebcomResult<Void>.Callback? = nil)

Equatable Protocol

  • Declaration

    Swift

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

Hashable Protocol

  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)

CustomStringConvertible Protocol

  • Declaration

    Swift

    public var description: String { get }

Combine Module

  • The type that wraps DatasyncNode in order to enrich it with a Combine-based API.

    See also the documentation section of WebcomWrapper for the corresponding wrapped type.

    To use this type, import the following dependency in your code:

    import WebcomCombine
    
    See more

    Declaration

    Swift

    public final class CombineWrapper : WebcomWrapper, Hashable, CustomStringConvertible
  • The wrapping instance, which has a Combine-based API.

    Declaration

    Swift

    public var forCombine: CombineWrapper { get }