Enum over::value::Value
[−]
[src]
pub enum Value { Null, Bool(bool), Int(BigInt), Frac(BigFraction), Char(char), Str(String), Arr(Arr), Tup(Tup), Obj(Obj), }
Enum of possible values and their inner types.
Variants
Null
A null value.
Bool(bool)
A boolean value.
Int(BigInt)
A signed integer value.
Frac(BigFraction)
A fractional value.
Char(char)
A character value.
Str(String)
A string value.
Arr(Arr)
An array value.
Tup(Tup)
A tuple value.
Obj(Obj)
An object value.
Methods
impl Value
[src]
fn is_null(&self) -> bool
[src]
Returns true iff this Value
is null.
fn get_type(&self) -> Type
[src]
Returns the Type
of this Value
.
fn get_bool(&self) -> OverResult<bool>
[src]
Returns the bool
contained in this Value
.
Returns an error if this Value
is not Bool.
fn get_int(&self) -> OverResult<BigInt>
[src]
Returns the BigInt
contained in this Value
.
Returns an error if this Value
is not Int.
fn get_frac(&self) -> OverResult<BigFraction>
[src]
Returns the BigFraction
contained in this Value
.
Returns an error if this Value
is not Frac.
fn get_char(&self) -> OverResult<char>
[src]
Returns the char
contained in this Value
.
Returns an error if this Value
is not Char.
fn get_str(&self) -> OverResult<String>
[src]
Returns the String
contained in this Value
.
Returns an error if this Value
is not Str.
fn get_arr(&self) -> OverResult<Arr>
[src]
Returns the Arr
contained in this Value
.
Returns an error if this Value
is not Arr.
fn get_tup(&self) -> OverResult<Tup>
[src]
Returns the Tup
contained in this Value
.
Returns an error if this Value
is not Tup.
fn get_obj(&self) -> OverResult<Obj>
[src]
Returns the Obj
contained in this Value
.
Returns an error if this Value
is not Obj.
Trait Implementations
impl Clone for Value
[src]
fn clone(&self) -> Value
[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 Value
[src]
impl PartialEq for Value
[src]
fn eq(&self, __arg_0: &Value) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Value) -> bool
[src]
This method tests for !=
.
impl PartialEq<bool> for Value
[src]
fn eq(&self, other: &bool) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<BigInt> for Value
[src]
fn eq(&self, other: &BigInt) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<BigFraction> for Value
[src]
fn eq(&self, other: &BigFraction) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<char> for Value
[src]
fn eq(&self, other: &char) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<String> for Value
[src]
fn eq(&self, other: &String) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<Arr> for Value
[src]
fn eq(&self, other: &Arr) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<Tup> for Value
[src]
fn eq(&self, other: &Tup) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<Obj> for Value
[src]
fn eq(&self, other: &Obj) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<'a> PartialEq<&'a str> for Value
[src]
fn eq(&self, other: &&str) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl From<bool> for Value
[src]
impl From<usize> for Value
[src]
impl From<u8> for Value
[src]
impl From<u16> for Value
[src]
impl From<u32> for Value
[src]
impl From<u64> for Value
[src]
impl From<i8> for Value
[src]
impl From<i16> for Value
[src]
impl From<i32> for Value
[src]
impl From<i64> for Value
[src]
impl From<BigInt> for Value
[src]
impl From<f32> for Value
[src]
impl From<f64> for Value
[src]
impl From<BigFraction> for Value
[src]
fn from(inner: BigFraction) -> Self
[src]
Performs the conversion.