Enum edn::types::Value
[−]
[src]
Value represents one of the allowed values in an EDN string.
Variants
Nil
Boolean(bool)
Integer(i64)
Instant(DateTime<Utc>)
BigInteger(BigInt)
Float(OrderedFloat<f64>)
Text(String)
Uuid(Uuid)
PlainSymbol(PlainSymbol)
NamespacedSymbol(NamespacedSymbol)
Keyword(Keyword)
Vector(Vec<Value>)
List(LinkedList<Value>)
Set(BTreeSet<Value>)
Map(BTreeMap<Value, Value>)
Methods
impl Value
[src]
[−]
impl Value
pub fn with_spans(self) -> ValueAndSpan
[src]
[−]
pub fn with_spans(self) -> ValueAndSpan
For debug use only!
But right now, it's used in the bootstrapper. We'll fix that soon.
impl Value
[src]
[−]
impl Value
pub fn is_nil(&self) -> bool
[src]
pub fn is_nil(&self) -> bool
pub fn is_boolean(&self) -> bool
[src]
pub fn is_boolean(&self) -> bool
pub fn is_integer(&self) -> bool
[src]
pub fn is_integer(&self) -> bool
pub fn is_instant(&self) -> bool
[src]
pub fn is_instant(&self) -> bool
pub fn is_big_integer(&self) -> bool
[src]
pub fn is_big_integer(&self) -> bool
pub fn is_float(&self) -> bool
[src]
pub fn is_float(&self) -> bool
pub fn is_text(&self) -> bool
[src]
pub fn is_text(&self) -> bool
pub fn is_uuid(&self) -> bool
[src]
pub fn is_uuid(&self) -> bool
pub fn is_symbol(&self) -> bool
[src]
pub fn is_symbol(&self) -> bool
pub fn is_namespaced_symbol(&self) -> bool
[src]
pub fn is_namespaced_symbol(&self) -> bool
pub fn is_vector(&self) -> bool
[src]
pub fn is_vector(&self) -> bool
pub fn is_list(&self) -> bool
[src]
pub fn is_list(&self) -> bool
pub fn is_set(&self) -> bool
[src]
pub fn is_set(&self) -> bool
pub fn is_map(&self) -> bool
[src]
pub fn is_map(&self) -> bool
pub fn is_keyword(&self) -> bool
[src]
pub fn is_keyword(&self) -> bool
pub fn is_namespaced_keyword(&self) -> bool
[src]
pub fn is_namespaced_keyword(&self) -> bool
pub fn as_nil(&self) -> Option<()>
[src]
[−]
pub fn as_nil(&self) -> Option<()>
as_nil
does not use the macro as it does not have an underlying
value, and returns Option<()>
.
pub fn as_boolean(&self) -> Option<bool>
[src]
pub fn as_boolean(&self) -> Option<bool>
pub fn as_integer(&self) -> Option<i64>
[src]
pub fn as_integer(&self) -> Option<i64>
pub fn as_instant(&self) -> Option<DateTime<Utc>>
[src]
pub fn as_instant(&self) -> Option<DateTime<Utc>>
pub fn as_float(&self) -> Option<f64>
[src]
pub fn as_float(&self) -> Option<f64>
pub fn as_big_integer(&self) -> Option<&BigInt>
[src]
pub fn as_big_integer(&self) -> Option<&BigInt>
pub fn as_ordered_float(&self) -> Option<&OrderedFloat<f64>>
[src]
pub fn as_ordered_float(&self) -> Option<&OrderedFloat<f64>>
pub fn as_text(&self) -> Option<&String>
[src]
pub fn as_text(&self) -> Option<&String>
pub fn as_uuid(&self) -> Option<&Uuid>
[src]
pub fn as_uuid(&self) -> Option<&Uuid>
pub fn as_symbol(&self) -> Option<&PlainSymbol>
[src]
pub fn as_symbol(&self) -> Option<&PlainSymbol>
pub fn as_namespaced_symbol(&self) -> Option<&NamespacedSymbol>
[src]
pub fn as_namespaced_symbol(&self) -> Option<&NamespacedSymbol>
pub fn as_keyword(&self) -> Option<&Keyword>
[src]
pub fn as_keyword(&self) -> Option<&Keyword>
pub fn as_plain_keyword(&self) -> Option<&Keyword>
[src]
pub fn as_plain_keyword(&self) -> Option<&Keyword>
pub fn as_namespaced_keyword(&self) -> Option<&Keyword>
[src]
pub fn as_namespaced_keyword(&self) -> Option<&Keyword>
pub fn as_vector(&self) -> Option<&Vec<Value>>
[src]
pub fn as_vector(&self) -> Option<&Vec<Value>>
pub fn as_list(&self) -> Option<&LinkedList<Value>>
[src]
pub fn as_list(&self) -> Option<&LinkedList<Value>>
pub fn as_set(&self) -> Option<&BTreeSet<Value>>
[src]
pub fn as_set(&self) -> Option<&BTreeSet<Value>>
pub fn as_map(&self) -> Option<&BTreeMap<Value, Value>>
[src]
pub fn as_map(&self) -> Option<&BTreeMap<Value, Value>>
pub fn into_boolean(self) -> Option<bool>
[src]
pub fn into_boolean(self) -> Option<bool>
pub fn into_integer(self) -> Option<i64>
[src]
pub fn into_integer(self) -> Option<i64>
pub fn into_instant(self) -> Option<DateTime<Utc>>
[src]
pub fn into_instant(self) -> Option<DateTime<Utc>>
pub fn into_big_integer(self) -> Option<BigInt>
[src]
pub fn into_big_integer(self) -> Option<BigInt>
pub fn into_ordered_float(self) -> Option<OrderedFloat<f64>>
[src]
pub fn into_ordered_float(self) -> Option<OrderedFloat<f64>>
pub fn into_float(self) -> Option<f64>
[src]
pub fn into_float(self) -> Option<f64>
pub fn into_text(self) -> Option<String>
[src]
pub fn into_text(self) -> Option<String>
pub fn into_uuid(self) -> Option<Uuid>
[src]
pub fn into_uuid(self) -> Option<Uuid>
pub fn into_symbol(self) -> Option<PlainSymbol>
[src]
pub fn into_symbol(self) -> Option<PlainSymbol>
pub fn into_namespaced_symbol(self) -> Option<NamespacedSymbol>
[src]
pub fn into_namespaced_symbol(self) -> Option<NamespacedSymbol>
pub fn into_keyword(self) -> Option<Keyword>
[src]
pub fn into_keyword(self) -> Option<Keyword>
pub fn into_plain_keyword(self) -> Option<Keyword>
[src]
pub fn into_plain_keyword(self) -> Option<Keyword>
pub fn into_namespaced_keyword(self) -> Option<Keyword>
[src]
pub fn into_namespaced_keyword(self) -> Option<Keyword>
pub fn into_vector(self) -> Option<Vec<Value>>
[src]
pub fn into_vector(self) -> Option<Vec<Value>>
pub fn into_list(self) -> Option<LinkedList<Value>>
[src]
pub fn into_list(self) -> Option<LinkedList<Value>>
pub fn into_set(self) -> Option<BTreeSet<Value>>
[src]
pub fn into_set(self) -> Option<BTreeSet<Value>>
pub fn into_map(self) -> Option<BTreeMap<Value, Value>>
[src]
pub fn into_map(self) -> Option<BTreeMap<Value, Value>>
pub fn from_bigint(src: &str) -> Option<Value>
[src]
pub fn from_bigint(src: &str) -> Option<Value>
pub fn from_float(src: f64) -> Value
[src]
pub fn from_float(src: f64) -> Value
pub fn from_ordered_float(src: OrderedFloat<f64>) -> Value
[src]
pub fn from_ordered_float(src: OrderedFloat<f64>) -> Value
pub fn from_symbol<'a, T: Into<Option<&'a str>>>(
namespace: T,
name: &str
) -> Value
[src]
pub fn from_symbol<'a, T: Into<Option<&'a str>>>(
namespace: T,
name: &str
) -> Value
pub fn from_keyword<'a, T: Into<Option<&'a str>>>(
namespace: T,
name: &str
) -> Value
[src]
pub fn from_keyword<'a, T: Into<Option<&'a str>>>(
namespace: T,
name: &str
) -> Value
pub fn is_collection(&self) -> bool
[src]
pub fn is_collection(&self) -> bool
pub fn is_atom(&self) -> bool
[src]
pub fn is_atom(&self) -> bool
pub fn into_atom(self) -> Option<Value>
[src]
pub fn into_atom(self) -> Option<Value>
impl Value
[src]
[−]
impl Value
pub fn to_pretty(&self, width: usize) -> Result<String, Error>
[src]
[−]
pub fn to_pretty(&self, width: usize) -> Result<String, Error>
Return a pretty string representation of this Value
.
impl Value
[src]
[−]
impl Value
pub fn matches(&self, pattern: &Value) -> bool
[src]
[−]
pub fn matches(&self, pattern: &Value) -> bool
Performs default pattern matching between this value and some pattern
.
Returns true if matching succeeds.
Trait Implementations
impl PartialEq for Value
[src]
[+]
impl PartialEq for Value
impl Eq for Value
[src]
impl Eq for Value
impl Hash for Value
[src]
[+]
impl Hash for Value
impl Clone for Value
[src]
[+]
impl Clone for Value
impl Debug for Value
[src]
[+]
impl Debug for Value
impl From<SpannedValue> for Value
[src]
[+]
impl From<SpannedValue> for Value
impl From<ValueAndSpan> for Value
[src]
[+]
impl From<ValueAndSpan> for Value
impl PartialOrd for Value
[src]
[+]
impl PartialOrd for Value
impl Ord for Value
[src]
[+]
impl Ord for Value
impl Display for Value
[src]
[+]
impl Display for Value