Protocols

The following protocols are available globally.

  • A marker interface that represents a diff or two versions of a document/object.

    The actual implementation of a diff will vary depending on the type of content the ClientSynchronizer can handle.

    Declaration

    Swift

    public protocol Difference: Printable
  • An instance of this class will be able to handle tasks needed to implement Differential Synchronization for a specific type of documents.

    <T> the type of Documents that this synchronizer can handle
    <D> the type of Edits that this synchronizer can handle
    <P> the type of PatchMessage that this synchronizer can handle

    See more

    Declaration

    Swift

    public protocol ClientSynchronizer
  • Represents a single edit. The typealias D refer to the type of the Diff comaptible with the Edit.

    See more

    Declaration

    Swift

    public protocol Edit: Equatable, Printable
  • Represents a stack of changes made on the server of client side.

    A PatchMessage is what is passed between the client and the server. It contains an array of Edits that represent updates to be performed on the opposing sides document.

    <E> the type of the Edit that this PatchMessage holds.

    See more

    Declaration

    Swift

    public protocol PatchMessage: Printable, Payload
  • Represents something that can be exchanged in JSON format.

    <T> the type of the payload.

    See more

    Declaration

    Swift

    public protocol Payload
  • A DataStore implementation is responsible for storing and serving data for a Differential Synchronization implementation.

    <T> the type of the Document that this data store can store.
    <D> the type of Edits that this data store can store.

    See more

    Declaration

    Swift

    public protocol DataStore