DittoRegister
Represents a CRDT register that can be upserted as part of a document or assigned to a property during an update of a document.
-
Initializes a new register with the provided value that can be used as part of a document’s content.
-
Returns the register’s value as an
Any?
. -
Returns the register’s value as a
String
if possible, otherwise the return value will benil
. -
Returns the register’s value as a
String
. If the register’s inner value isn’t aString
the return value will be an empty string. -
Returns the register’s value as a
Bool
if possible, otherwise the return value will benil
. -
Returns the register’s value as a
Bool
. If the register’s inner value isn’t aBool
the return value will befalse
. -
Returns the register’s value as an
Int
if possible, otherwise the return value will benil
. -
Returns the register’s value as an
Int
. If the register’s inner value isn’t anInt
the return value will be 0. -
Returns the register’s value as a
UInt
if possible, otherwise the return value will benil
. -
Returns the register’s value as a
UInt
. If the register’s inner value isn’t aUInt
the return value will be 0. -
Returns the register’s value as a
Float
if possible, otherwise the return value will benil
. -
Returns the register’s value as a
Float
. If the register’s inner value isn’t aFloat
the return value will be 0. -
Returns the register’s value as a
Double
if possible, otherwise the return value will benil
. -
Returns the register’s value as a
Double
. If the register’s inner value isn’t aDouble
the return value will be 0. -
Returns the register’s value as an
Array<Any?>
if possible, otherwise the return value will benil
. -
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. -
Returns the register’s value as a
[String: Any?]
if possible, otherwise the return value will benil
. -
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.