DittoMutableRegister
public class 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.
Declaration
Swift
public var value: Any? { get set }
-
Returns the register’s value as a
Stringif possible, otherwise the return value will benil.Declaration
Swift
public var string: String? { get } -
Returns the register’s value as a
String. If the register’s inner value isn’t aStringthe return value will be an empty string.Declaration
Swift
public var stringValue: String { get } -
Returns the register’s value as a
Boolif possible, otherwise the return value will benil.Declaration
Swift
public var bool: Bool? { get } -
Returns the register’s value as a
Bool. If the register’s inner value isn’t aBoolthe return value will befalse.Declaration
Swift
public var boolValue: Bool { get } -
Returns the register’s value as an
Intif possible, otherwise the return value will benil.Declaration
Swift
public var int: Int? { get } -
Returns the register’s value as an
Int. If the register’s inner value isn’t anIntthe return value will be 0.Declaration
Swift
public var intValue: Int { get } -
Returns the register’s value as a
UIntif possible, otherwise the return value will benil.Declaration
Swift
public var uint: UInt? { get } -
Returns the register’s value as a
UInt. If the register’s inner value isn’t aUIntthe return value will be 0.Declaration
Swift
public var uintValue: UInt { get } -
Returns the register’s value as a
Floatif possible, otherwise the return value will benil.Declaration
Swift
public var float: Float? { get } -
Returns the register’s value as a
Float. If the register’s inner value isn’t aFloatthe return value will be 0.Declaration
Swift
public var floatValue: Float { get } -
Returns the register’s value as a
Doubleif possible, otherwise the return value will benil.Declaration
Swift
public var double: Double? { get } -
Returns the register’s value as a
Double. If the register’s inner value isn’t aDoublethe return value will be 0.Declaration
Swift
public var doubleValue: Double { get } -
Returns the register’s value as an
Array<Any?>if possible, otherwise the return value will benil.Declaration
Swift
public var array: [Any?]? { get } -
Returns the register’s value as an
Array<Any?>. If the register’s inner value isn’t anArray<Any?>the return value will be an empty array.Declaration
Swift
public var arrayValue: [Any?] { get } -
Returns the register’s value as a
[String: Any?]if possible, otherwise the return value will benil.Declaration
Swift
public var dictionary: [String : Any?]? { get } -
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.Declaration
Swift
public var dictionaryValue: [String : Any?] { get }
DittoMutableRegister Class Reference