pub enum DiffValue {
Null,
Bool(bool),
Int(i64),
UInt(u64),
Float(f64),
String(String),
Bytes(Vec<u8>),
Complex(String),
}Expand description
A JSON-serializable representation of a value in a diff. We can’t use Object directly because it contains ObjectIds which aren’t meaningful to external consumers.
Variants§
Null
Bool(bool)
Int(i64)
UInt(u64)
Above i64::MAX. Before Float: untagged, so a large integer read
back must reach this variant first.
Float(f64)
String(String)
Bytes(Vec<u8>)
Complex(String)
For complex values (maps, lists), we store a summary rather than the full deep value.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DiffValue
impl<'de> Deserialize<'de> for DiffValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for DiffValue
Auto Trait Implementations§
impl Freeze for DiffValue
impl RefUnwindSafe for DiffValue
impl Send for DiffValue
impl Sync for DiffValue
impl Unpin for DiffValue
impl UnsafeUnpin for DiffValue
impl UnwindSafe for DiffValue
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