Struct wagon_value::RecursiveValue
source · pub struct RecursiveValue(/* private fields */);
Expand description
A Valueable
that can hold a list/dict mapping to other values.
Because of recursion limits in Rust, Value
can not be implemented over itself.
RecursiveValue
is, for all intents and purposes, a Value
implemented over itself.
If the basic Value
enum is enough for your purposes, you will want to use RecursiveValue
.
§Example
Instead of doing this:
use wagon_value::Value;
Do this:
use wagon_value::RecursiveValue as Value;
Trait Implementations§
source§impl Add<RecursiveValue> for Value<RecursiveValue>
impl Add<RecursiveValue> for Value<RecursiveValue>
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
+
operator.source§impl<'a> Add<Value<RecursiveValue>> for RecursiveValue
impl<'a> Add<Value<RecursiveValue>> for RecursiveValue
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
+
operator.source§impl Add for RecursiveValue
impl Add for RecursiveValue
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
+
operator.source§impl Clone for RecursiveValue
impl Clone for RecursiveValue
source§fn clone(&self) -> RecursiveValue
fn clone(&self) -> RecursiveValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RecursiveValue
impl Debug for RecursiveValue
source§impl Deref for RecursiveValue
impl Deref for RecursiveValue
source§impl Display for RecursiveValue
impl Display for RecursiveValue
source§impl Div<RecursiveValue> for Value<RecursiveValue>
impl Div<RecursiveValue> for Value<RecursiveValue>
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
/
operator.source§impl<'a> Div<Value<RecursiveValue>> for RecursiveValue
impl<'a> Div<Value<RecursiveValue>> for RecursiveValue
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
/
operator.source§impl Div for RecursiveValue
impl Div for RecursiveValue
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
/
operator.source§impl From<RecursiveValue> for Value<RecursiveValue>
impl From<RecursiveValue> for Value<RecursiveValue>
source§fn from(value: RecursiveValue) -> Self
fn from(value: RecursiveValue) -> Self
Converts to this type from the input type.
source§impl From<Value<RecursiveValue>> for RecursiveValue
impl From<Value<RecursiveValue>> for RecursiveValue
source§impl Hash for RecursiveValue
impl Hash for RecursiveValue
source§impl Mul<RecursiveValue> for Value<RecursiveValue>
impl Mul<RecursiveValue> for Value<RecursiveValue>
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
*
operator.source§impl<'a> Mul<Value<RecursiveValue>> for RecursiveValue
impl<'a> Mul<Value<RecursiveValue>> for RecursiveValue
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
*
operator.source§impl Mul for RecursiveValue
impl Mul for RecursiveValue
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
*
operator.source§impl PartialEq for RecursiveValue
impl PartialEq for RecursiveValue
source§fn eq(&self, other: &RecursiveValue) -> bool
fn eq(&self, other: &RecursiveValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for RecursiveValue
impl PartialOrd for RecursiveValue
source§fn partial_cmp(&self, other: &RecursiveValue) -> Option<Ordering>
fn partial_cmp(&self, other: &RecursiveValue) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Pow<RecursiveValue> for RecursiveValue
impl Pow<RecursiveValue> for RecursiveValue
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The result after applying the operator.
source§impl Pow<RecursiveValue> for Value<RecursiveValue>
impl Pow<RecursiveValue> for Value<RecursiveValue>
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The result after applying the operator.
source§impl<'a> Pow<Value<RecursiveValue>> for RecursiveValue
impl<'a> Pow<Value<RecursiveValue>> for RecursiveValue
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The result after applying the operator.
source§impl Rem<RecursiveValue> for Value<RecursiveValue>
impl Rem<RecursiveValue> for Value<RecursiveValue>
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
%
operator.source§impl<'a> Rem<Value<RecursiveValue>> for RecursiveValue
impl<'a> Rem<Value<RecursiveValue>> for RecursiveValue
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
%
operator.source§impl Rem for RecursiveValue
impl Rem for RecursiveValue
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
%
operator.source§impl Sub<RecursiveValue> for Value<RecursiveValue>
impl Sub<RecursiveValue> for Value<RecursiveValue>
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
-
operator.source§impl<'a> Sub<Value<RecursiveValue>> for RecursiveValue
impl<'a> Sub<Value<RecursiveValue>> for RecursiveValue
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
-
operator.source§impl Sub for RecursiveValue
impl Sub for RecursiveValue
§type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
type Output = Result<RecursiveValue, ValueError<RecursiveValue>>
The resulting type after applying the
-
operator.source§impl ToValue<RecursiveValue> for RecursiveValue
impl ToValue<RecursiveValue> for RecursiveValue
impl Eq for RecursiveValue
impl StructuralPartialEq for RecursiveValue
Auto Trait Implementations§
impl Freeze for RecursiveValue
impl RefUnwindSafe for RecursiveValue
impl Send for RecursiveValue
impl Sync for RecursiveValue
impl Unpin for RecursiveValue
impl UnwindSafe for RecursiveValue
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Valueable for T
impl<T> Valueable for T
source§fn display_numerical(&self) -> Result<String, ValueError<T>>
fn display_numerical(&self) -> Result<String, ValueError<T>>
Get a string representation of the value, as if it were a number. Read more