[][src]Enum hatter::Value

pub enum Value {
    None,
    Bool(bool),
    Number(f64),
    String(Symbol),
    List(List),
    Map(Map),
    Fn(Fn),
    Object(Rc<dyn Object>),
}

Value is the dynamic type that represents an active Hatter object, including objects you define in your own code.

Variants

None
Bool(bool)
Number(f64)
String(Symbol)
List(List)
Map(Map)
Fn(Fn)
Object(Rc<dyn Object>)

Implementations

impl Value[src]

pub fn ok(self) -> Result<Value>[src]

pub fn some(self) -> Option<Value>[src]

pub fn len(&self) -> usize[src]

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

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

pub fn to_f64(&self) -> f64[src]

pub fn to_str(&self) -> &str[src]

pub fn typename(&self) -> &str[src]

Trait Implementations

impl Clone for Value[src]

impl Debug for Value[src]

impl Display for Value[src]

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

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

impl<T: Copy + Into<Value>, '_> From<&'_ [T]> for Value[src]

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

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

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

impl<T: Copy + Into<Value>, '_> From<&'_ Vec<T>> for Value[src]

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

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

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

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

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

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

impl<V> From<(V,)> for Value where
    V: Into<Value>, 
[src]

impl<V1, V2, V3, V4, V5, V6> From<(V1, V2, V3, V4, V5, V6)> for Value where
    V1: Into<Value>,
    V2: Into<Value>,
    V3: Into<Value>,
    V4: Into<Value>,
    V5: Into<Value>,
    V6: Into<Value>, 
[src]

impl<V1, V2, V3, V4, V5> From<(V1, V2, V3, V4, V5)> for Value where
    V1: Into<Value>,
    V2: Into<Value>,
    V3: Into<Value>,
    V4: Into<Value>,
    V5: Into<Value>, 
[src]

impl<V1, V2, V3, V4> From<(V1, V2, V3, V4)> for Value where
    V1: Into<Value>,
    V2: Into<Value>,
    V3: Into<Value>,
    V4: Into<Value>, 
[src]

impl<V1, V2, V3> From<(V1, V2, V3)> for Value where
    V1: Into<Value>,
    V2: Into<Value>,
    V3: Into<Value>, 
[src]

impl<V1, V2> From<(V1, V2)> for Value where
    V1: Into<Value>,
    V2: Into<Value>, 
[src]

impl<S, V> From<BTreeMap<S, V>> for Value where
    S: Into<Symbol>,
    V: Into<Value>, 
[src]

impl<F> From<F> for Value where
    F: 'static + Fn(Args<'_>) -> Result<Value>, 
[src]

impl<S, V> From<HashMap<S, V, RandomState>> for Value where
    S: Into<Symbol>,
    V: Into<Value>, 
[src]

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

impl From<Stmt> for Value[src]

impl From<String> for Value[src]

impl From<Symbol> for Value[src]

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

impl From<bool> for Value[src]

impl From<f64> for Value[src]

impl From<i32> for Value[src]

impl From<isize> for Value[src]

impl From<usize> for Value[src]

impl PartialEq<Value> for Value[src]

impl PartialEq<Value> for String[src]

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.