[][src]Enum v_eval::Value

pub enum Value {
    Bool(bool),
    Float(f64),
    Int(i64),
    Str(String),
    Range(Range<i64>),
    Vec(Vec<Value>),
    None,
}

Wrapper for value implements simple operations and check types

Panic

Panics if operate different value types

Variants

Bool(bool)
Float(f64)
Int(i64)
Str(String)
Range(Range<i64>)
Vec(Vec<Value>)
None

Methods

impl Value[src]

pub fn is_same(&self, other: &Value) -> bool[src]

Is same type

pub fn not(&self) -> Value[src]

pub fn neg(&self) -> Value[src]

pub fn and(&self, other: &Value) -> Value[src]

pub fn or(&self, other: &Value) -> Value[src]

pub fn unwrap(self) -> Result<Self, ()>[src]

pub fn is_some(&self) -> bool[src]

Trait Implementations

impl Add<Value> for Value[src]

type Output = Value

The resulting type after applying the + operator.

impl Clone for Value[src]

impl Debug for Value[src]

impl Display for Value[src]

impl Div<Value> for Value[src]

type Output = Value

The resulting type after applying the / operator.

impl<'_> From<&'_ Value> for Value[src]

impl<'_> From<&'_ str> for Value[src]

impl<V: Into<Value>> From<Option<V>> for Value[src]

impl From<Range<i64>> for Value[src]

impl From<String> for Value[src]

impl<V: Into<Value>> From<Vec<V>> for Value[src]

impl From<bool> for Value[src]

impl From<f32> for Value[src]

impl From<f64> for Value[src]

impl From<i16> for Value[src]

impl From<i32> for Value[src]

impl From<i64> for Value[src]

impl From<i8> for Value[src]

impl From<isize> for Value[src]

impl From<u16> for Value[src]

impl From<u32> for Value[src]

impl From<u64> for Value[src]

impl From<u8> for Value[src]

impl From<usize> for Value[src]

impl Mul<Value> for Value[src]

type Output = Value

The resulting type after applying the * operator.

impl PartialEq<Value> for Value[src]

impl PartialOrd<Value> for Value[src]

impl Rem<Value> for Value[src]

type Output = Value

The resulting type after applying the % operator.

impl Sub<Value> for Value[src]

type Output = Value

The resulting type after applying the - operator.

impl TryInto<Range<i64>> for Value[src]

type Error = ()

The type returned in the event of a conversion error.

impl TryInto<String> for Value[src]

type Error = ()

The type returned in the event of a conversion error.

impl TryInto<Vec<Value>> for Value[src]

type Error = ()

The type returned in the event of a conversion error.

impl TryInto<bool> for Value[src]

type Error = ()

The type returned in the event of a conversion error.

impl TryInto<f64> for Value[src]

type Error = ()

The type returned in the event of a conversion error.

impl TryInto<i64> for Value[src]

type Error = ()

The type returned in the event of a conversion error.

impl TryInto<usize> for Value[src]

type Error = ()

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Value

impl Send for Value

impl Sync for Value

impl Unpin for Value

impl UnwindSafe for Value

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.