pub enum ExternalValue {
Show 18 variants
Number(f64),
Int(i64),
Bool(bool),
String(String),
None,
Unit,
Array(Vec<ExternalValue>),
Object(BTreeMap<String, ExternalValue>),
TypedObject {
name: String,
fields: BTreeMap<String, ExternalValue>,
},
Enum {
name: String,
variant: String,
data: Box<ExternalValue>,
},
Duration {
secs: u64,
nanos: u32,
},
Time(String),
Decimal(String),
Error(String),
Ok(Box<ExternalValue>),
Range {
start: Option<Box<ExternalValue>>,
end: Option<Box<ExternalValue>>,
inclusive: bool,
},
DataTable {
rows: usize,
columns: Vec<String>,
},
Opaque(String),
}Expand description
A serde-serializable value with no VM internals.
This is the “external” representation of a Shape value, suitable for display, wire serialization, and debugging. It contains no function references, closures, or raw pointers.
Variants§
Number(f64)
64-bit float
Int(i64)
64-bit signed integer
Bool(bool)
Boolean
String(String)
String
None
None / null
Unit
Unit (void)
Array(Vec<ExternalValue>)
Homogeneous or heterogeneous array
Object(BTreeMap<String, ExternalValue>)
Untyped object (field name -> value)
TypedObject
Typed object with schema name
Enum
Enum variant
Duration
Duration
Time(String)
Timestamp (ISO 8601 string for portability)
Decimal(String)
Decimal (string representation for precision)
Error(String)
Error message
Ok(Box<ExternalValue>)
Result::Ok
Range
Range
DataTable
DataTable summary (not full data — just metadata)
Opaque(String)
Opaque value that cannot be externalized (function, closure, etc.)
Trait Implementations§
Source§impl Clone for ExternalValue
impl Clone for ExternalValue
Source§fn clone(&self) -> ExternalValue
fn clone(&self) -> ExternalValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExternalValue
impl Debug for ExternalValue
Source§impl<'de> Deserialize<'de> for ExternalValue
impl<'de> Deserialize<'de> for ExternalValue
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
Source§impl Display for ExternalValue
impl Display for ExternalValue
Source§impl PartialEq for ExternalValue
impl PartialEq for ExternalValue
Source§impl Serialize for ExternalValue
impl Serialize for ExternalValue
impl StructuralPartialEq for ExternalValue
Auto Trait Implementations§
impl Freeze for ExternalValue
impl RefUnwindSafe for ExternalValue
impl Send for ExternalValue
impl Sync for ExternalValue
impl Unpin for ExternalValue
impl UnsafeUnpin for ExternalValue
impl UnwindSafe for ExternalValue
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