Enum edn_format::Value [−][src]
pub enum Value {
Show 17 variants
Nil,
Boolean(bool),
Character(char),
String(String),
Symbol(Symbol),
Keyword(Keyword),
Integer(i64),
Float(OrderedFloat<f64>),
BigInt(BigInt),
BigDec(BigDecimal),
List(Vec<Value>),
Vector(Vec<Value>),
Map(BTreeMap<Value, Value>),
Set(BTreeSet<Value>),
Inst(DateTime<FixedOffset>),
Uuid(Uuid),
TaggedElement(Symbol, Box<Value>),
}Expand description
An EDN Value.
Variants
Nil
nil. Analogous to null, nothing, zip, zilch, and nada.
Boolean(bool)
Tuple Fields
0: boolA boolean value
Character(char)
Tuple Fields
0: charA single character.
String(String)
Tuple Fields
0: StringA string. Used to represent textual data.
Symbol(Symbol)
Tuple Fields
0: SymbolA symbol. Used to represent identifiers.
Keyword(Keyword)
Tuple Fields
0: KeywordA keyword. An identifier that designates itself. For typical use, these should be used for keys in Value::Map instead of Value::String.
Integer(i64)
Tuple Fields
0: i64A signed integer
Float(OrderedFloat<f64>)
Tuple Fields
0: OrderedFloat<f64>A floating point number with 64 bit precision.
BigInt(BigInt)
Tuple Fields
0: BigIntAn integer with arbitrary precision
BigDec(BigDecimal)
Tuple Fields
0: BigDecimalA decimal number with exact precision
List(Vec<Value>)
A list of values.
Vector(Vec<Value>)
A vector of values. The major difference between this and a Value::List is that a vector is guaranteed by the spec to support random access of elements. In this implementation the semantic difference is maintained, but the underlying data structure for both is a Vec, which supports random access.
Map(BTreeMap<Value, Value>)
A collection of associations between keys and values. Supports any EDN value as a key. No semantics should be associated with the order in which the pairs appear.
Set(BTreeSet<Value>)
A collection of unique values. No semantics should be associated with the order the items appear.
Inst(DateTime<FixedOffset>)
Tuple Fields
0: DateTime<FixedOffset>An instant in time. Represented as a tagged element with tag inst and value
a RFC-3339 formatted string.
Uuid(Uuid)
Tuple Fields
0: UuidA UUID. Represented as a tagged element with tag uuid and value
a canonical UUID string.
https://github.com/edn-format/edn#uuid-f81d4fae-7dec-11d0-a765-00a0c91e6bf6
TaggedElement(Symbol, Box<Value>)
A tagged element. This can be used to encode any kind of data as a distinct readable element, with semantics determined by the reader and writer.
Overriding the behavior of elements tagged with inst and uuid is not supported
in this implementation.
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Value
impl UnwindSafe for Value
Blanket Implementations
Mutably borrows from an owned value. Read more
