Enum edn::types::SpannedValue
[−]
[src]
pub enum SpannedValue { 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<ValueAndSpan>), List(LinkedList<ValueAndSpan>), Set(BTreeSet<ValueAndSpan>), Map(BTreeMap<ValueAndSpan, ValueAndSpan>), }
SpannedValue
is the parallel to Value
but used in ValueAndSpan
.
Container types have ValueAndSpan
children.
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<ValueAndSpan>)
List(LinkedList<ValueAndSpan>)
Set(BTreeSet<ValueAndSpan>)
Map(BTreeMap<ValueAndSpan, ValueAndSpan>)
Methods
impl SpannedValue
[src]
pub fn is_nil(&self) -> bool
[src]
pub fn is_boolean(&self) -> bool
[src]
pub fn is_integer(&self) -> bool
[src]
pub fn is_instant(&self) -> bool
[src]
pub fn is_big_integer(&self) -> bool
[src]
pub fn is_float(&self) -> bool
[src]
pub fn is_text(&self) -> bool
[src]
pub fn is_uuid(&self) -> bool
[src]
pub fn is_symbol(&self) -> bool
[src]
pub fn is_namespaced_symbol(&self) -> bool
[src]
pub fn is_vector(&self) -> bool
[src]
pub fn is_list(&self) -> bool
[src]
pub fn is_set(&self) -> bool
[src]
pub fn is_map(&self) -> bool
[src]
pub fn is_keyword(&self) -> bool
[src]
pub fn is_namespaced_keyword(&self) -> bool
[src]
pub fn as_nil(&self) -> Option<()>
[src]
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_integer(&self) -> Option<i64>
[src]
pub fn as_instant(&self) -> Option<DateTime<Utc>>
[src]
pub fn as_float(&self) -> Option<f64>
[src]
pub fn as_big_integer(&self) -> Option<&BigInt>
[src]
pub fn as_ordered_float(&self) -> Option<&OrderedFloat<f64>>
[src]
pub fn as_text(&self) -> Option<&String>
[src]
pub fn as_uuid(&self) -> Option<&Uuid>
[src]
pub fn as_symbol(&self) -> Option<&PlainSymbol>
[src]
pub fn as_namespaced_symbol(&self) -> Option<&NamespacedSymbol>
[src]
pub fn as_keyword(&self) -> Option<&Keyword>
[src]
pub fn as_plain_keyword(&self) -> Option<&Keyword>
[src]
pub fn as_namespaced_keyword(&self) -> Option<&Keyword>
[src]
pub fn as_vector(&self) -> Option<&Vec<ValueAndSpan>>
[src]
pub fn as_list(&self) -> Option<&LinkedList<ValueAndSpan>>
[src]
pub fn as_set(&self) -> Option<&BTreeSet<ValueAndSpan>>
[src]
pub fn as_map(&self) -> Option<&BTreeMap<ValueAndSpan, ValueAndSpan>>
[src]
pub fn into_boolean(self) -> Option<bool>
[src]
pub fn into_integer(self) -> Option<i64>
[src]
pub fn into_instant(self) -> Option<DateTime<Utc>>
[src]
pub fn into_big_integer(self) -> Option<BigInt>
[src]
pub fn into_ordered_float(self) -> Option<OrderedFloat<f64>>
[src]
pub fn into_float(self) -> Option<f64>
[src]
pub fn into_text(self) -> Option<String>
[src]
pub fn into_uuid(self) -> Option<Uuid>
[src]
pub fn into_symbol(self) -> Option<PlainSymbol>
[src]
pub fn into_namespaced_symbol(self) -> Option<NamespacedSymbol>
[src]
pub fn into_keyword(self) -> Option<Keyword>
[src]
pub fn into_plain_keyword(self) -> Option<Keyword>
[src]
pub fn into_namespaced_keyword(self) -> Option<Keyword>
[src]
pub fn into_vector(self) -> Option<Vec<ValueAndSpan>>
[src]
pub fn into_list(self) -> Option<LinkedList<ValueAndSpan>>
[src]
pub fn into_set(self) -> Option<BTreeSet<ValueAndSpan>>
[src]
pub fn into_map(self) -> Option<BTreeMap<ValueAndSpan, ValueAndSpan>>
[src]
pub fn from_bigint(src: &str) -> Option<SpannedValue>
[src]
pub fn from_float(src: f64) -> SpannedValue
[src]
pub fn from_ordered_float(src: OrderedFloat<f64>) -> SpannedValue
[src]
pub fn from_symbol<'a, T: Into<Option<&'a str>>>(
namespace: T,
name: &str
) -> SpannedValue
[src]
namespace: T,
name: &str
) -> SpannedValue
pub fn from_keyword<'a, T: Into<Option<&'a str>>>(
namespace: T,
name: &str
) -> SpannedValue
[src]
namespace: T,
name: &str
) -> SpannedValue
pub fn is_collection(&self) -> bool
[src]
pub fn is_atom(&self) -> bool
[src]
pub fn into_atom(self) -> Option<SpannedValue>
[src]
Trait Implementations
impl PartialEq for SpannedValue
[src]
fn eq(&self, __arg_0: &SpannedValue) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SpannedValue) -> bool
[src]
This method tests for !=
.
impl Eq for SpannedValue
[src]
impl Hash for SpannedValue
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for SpannedValue
[src]
fn clone(&self) -> SpannedValue
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for SpannedValue
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl From<SpannedValue> for Value
[src]
fn from(src: SpannedValue) -> Value
[src]
Performs the conversion.
impl PartialOrd for SpannedValue
[src]
fn partial_cmp(&self, other: &SpannedValue) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for SpannedValue
[src]
fn cmp(&self, other: &SpannedValue) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more