DittoMutableRegister

Represents a mutable CRDT register that can be updated while updating a document.

This class can’t be instantiated directly. It’s returned automatically for any register property within an update block.

See also the register property of DittoMutableDocumentPath.

  • The value that is stored in the register.

Value accessors

  • Returns the register’s value as a String if possible, otherwise the return value will be nil.

  • Returns the register’s value as a String. If the register’s inner value isn’t a String the return value will be an empty string.

  • Returns the register’s value as a Bool if possible, otherwise the return value will be nil.

  • Returns the register’s value as a Bool. If the register’s inner value isn’t a Bool the return value will be false.

  • int

    Returns the register’s value as an Int if possible, otherwise the return value will be nil.

  • Returns the register’s value as an Int. If the register’s inner value isn’t an Int the return value will be 0.

  • Returns the register’s value as a UInt if possible, otherwise the return value will be nil.

  • Returns the register’s value as a UInt. If the register’s inner value isn’t a UInt the return value will be 0.

  • Returns the register’s value as a Float if possible, otherwise the return value will be nil.

  • Returns the register’s value as a Float. If the register’s inner value isn’t a Float the return value will be 0.

  • Returns the register’s value as a Double if possible, otherwise the return value will be nil.

  • Returns the register’s value as a Double. If the register’s inner value isn’t a Double the return value will be 0.

  • Returns the register’s value as an Array<Any?> if possible, otherwise the return value will be nil.

  • Returns the register’s value as an Array<Any?>. If the register’s inner value isn’t an Array<Any?> the return value will be an empty array.

  • Returns the register’s value as a [String: Any?] if possible, otherwise the return value will be nil.

  • Returns the register’s value as a [String: Any?]. If the register’s inner value isn’t a [String: Any?] the return value will be an empty dictionary.