/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
usesuper::{FromValueError, Node, Result}; use std::{collections::HashMap, fmt};
/// Represents the value of a node /// /// This is a loosely typed data structure similar to `serde_json::Value`. /// Nodes can be converted to/from `Value` which is what allows nodes to automatically be converted /// from one IR to another. pubenum Value {
UInt8(u8),
Int8(i8),
UInt16(u16),
Int16(i16),
UInt32(u32),
Int32(i32),
UInt64(u64),
Int64(i64),
Float32(f32),
Float64(f64),
String(String),
Bool(bool),
Option(Option<Box<Value>>),
Vec(Vec<Value>),
Map(Vec<(Value, Value)>),
Set(Vec<Value>), Struct {
type_name: &'static str,
fields: HashMap<&'static str, Value>,
},
Variant {
type_name: &'static str,
variant_name: &'static str,
fields: HashMap<&'static str, Value>,
},
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.