pub enum Value {
Nil,
Bool(bool),
Int(i64),
Float(NotNan<f64>),
Str(String),
Map(CrdtId),
Text(CrdtId),
Set(CrdtId),
Register(CrdtId),
}Expand description
Unified value type for reading from CRDTs.
This enum represents all values that can be read from CRDTs.
Primitive variants contain data directly; CRDT variants contain
opaque CrdtId handles for navigation.
For writing primitive values, use PrimitiveValue instead —
it prevents accidentally passing CRDT references to set().
Variants§
Nil
Nil/null value.
Bool(bool)
Boolean value.
Int(i64)
64-bit signed integer.
Float(NotNan<f64>)
64-bit floating point (never NaN).
Str(String)
String value (UTF-8).
Map(CrdtId)
Reference to a nested Map CRDT.
Text(CrdtId)
Reference to a nested Text CRDT.
Set(CrdtId)
Reference to a nested Set CRDT.
Register(CrdtId)
Reference to a nested Register CRDT.
Implementations§
Trait Implementations§
Source§impl From<PrimitiveValue> for Value
impl From<PrimitiveValue> for Value
Source§fn from(v: PrimitiveValue) -> Self
fn from(v: PrimitiveValue) -> Self
Converts to this type from the input type.
impl Eq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more