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(SymbolBox<Value>),
}
Expand description

An EDN Value.

Variants

Nil

nil. Analogous to null, nothing, zip, zilch, and nada.

https://github.com/edn-format/edn#nil

Boolean(bool)

Tuple Fields

0: bool

Character(char)

Tuple Fields

0: char

String(String)

Tuple Fields

0: String

A string. Used to represent textual data.

https://github.com/edn-format/edn#strings

Symbol(Symbol)

Tuple Fields

0: Symbol

A symbol. Used to represent identifiers.

https://github.com/edn-format/edn#symbols

Keyword(Keyword)

Tuple Fields

A keyword. An identifier that designates itself. For typical use, these should be used for keys in Value::Map instead of Value::String.

https://github.com/edn-format/edn#keywords

Integer(i64)

Tuple Fields

0: i64

Float(OrderedFloat<f64>)

Tuple Fields

A floating point number with 64 bit precision.

https://github.com/edn-format/edn#floating-point-numbers

BigInt(BigInt)

Tuple Fields

0: BigInt

An integer with arbitrary precision

https://github.com/edn-format/edn#integers

BigDec(BigDecimal)

Tuple Fields

A decimal number with exact precision

https://github.com/edn-format/edn#floating-point-numbers

List(Vec<Value>)

Tuple Fields

0: Vec<Value>

Vector(Vec<Value>)

Tuple Fields

0: 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.

https://github.com/edn-format/edn#vectors

Map(BTreeMap<Value, Value>)

Tuple Fields

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.

https://github.com/edn-format/edn#maps

Set(BTreeSet<Value>)

Tuple Fields

A collection of unique values. No semantics should be associated with the order the items appear.

https://github.com/edn-format/edn#sets

Inst(DateTime<FixedOffset>)

Tuple Fields

An instant in time. Represented as a tagged element with tag inst and value a RFC-3339 formatted string.

https://github.com/edn-format/edn#inst-rfc-3339-format

Uuid(Uuid)

Tuple Fields

0: Uuid

A 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(SymbolBox<Value>)

Tuple Fields

0: Symbol
1: 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.

https://github.com/edn-format/edn#tagged-elements

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.