pub enum WireValue {
Show 27 variants
Null,
Bool(bool),
Number(f64),
Integer(i64),
I8(i8),
U8(u8),
I16(i16),
U16(u16),
I32(i32),
U32(u32),
I64(i64),
U64(u64),
Isize(i64),
Usize(u64),
Ptr(u64),
F32(f32),
String(String),
Timestamp(i64),
Duration {
value: f64,
unit: DurationUnit,
},
Array(Vec<WireValue>),
Object(BTreeMap<String, WireValue>),
Table(WireTable),
Result {
ok: bool,
value: Box<WireValue>,
},
Range {
start: Option<Box<WireValue>>,
end: Option<Box<WireValue>>,
inclusive: bool,
},
FunctionRef {
name: String,
},
PrintResult(WirePrintResult),
Content(ContentNode),
}Expand description
The universal wire format for Shape values
This enum represents all Shape values in a serializable form. It is the core data structure exchanged between components.
Variants§
Null
Null/None value
Bool(bool)
Boolean value
Number(f64)
64-bit floating point number
Integer(i64)
64-bit signed integer
I8(i8)
8-bit signed integer (ABI-preserving native scalar)
U8(u8)
8-bit unsigned integer (ABI-preserving native scalar)
I16(i16)
16-bit signed integer (ABI-preserving native scalar)
U16(u16)
16-bit unsigned integer (ABI-preserving native scalar)
I32(i32)
32-bit signed integer (ABI-preserving native scalar)
U32(u32)
32-bit unsigned integer (ABI-preserving native scalar)
I64(i64)
64-bit signed integer (ABI-preserving native scalar)
U64(u64)
64-bit unsigned integer (ABI-preserving native scalar)
Isize(i64)
Pointer-width signed integer normalized to i64 for portability
Usize(u64)
Pointer-width unsigned integer normalized to u64 for portability
Ptr(u64)
C pointer value normalized to u64 for portability
F32(f32)
32-bit float (ABI-preserving native scalar)
String(String)
UTF-8 string
Timestamp(i64)
Timestamp as Unix milliseconds (UTC)
Duration
Duration with unit
Array(Vec<WireValue>)
Homogeneous array of values
Object(BTreeMap<String, WireValue>)
Object with string keys (ordered for deterministic serialization)
Table(WireTable)
Table data with Arrow IPC serialization
Result
Result type (Ok or Err)
Range
Range value
FunctionRef
Function reference (name only, not callable)
PrintResult(WirePrintResult)
Print result with structured spans
Content(ContentNode)
Structured content node for rich rendering
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WireValue
impl<'de> Deserialize<'de> for WireValue
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>,
Source§impl From<Value> for WireValue
Convert from serde_json::Value to WireValue
impl From<Value> for WireValue
Convert from serde_json::Value to WireValue
This allows creating envelopes from JSON values for display purposes. Note: This conversion is lossy - JSON doesn’t have type information for things like Timestamp vs Integer, so we use heuristics.