[][src]Enum mtots_core::Value

pub enum Value {
    Uninitialized,
    Nil,
    Bool(bool),
    Int(i64),
    Float(f64),
    Symbol(Symbol),
    String(RcStr),
    Bytes(Rc<Vec<u8>>),
    Path(RcPath),
    List(Rc<Vec<Value>>),
    Table(Rc<Table>),
    Set(Rc<VSet>),
    Map(Rc<VMap>),
    UserObject(Rc<UserObject>),
    Exception(Rc<Exception>),
    NativeFunction(Rc<NativeFunction>),
    NativeClosure(Rc<NativeClosure>),
    Code(Rc<Code>),
    Function(Rc<Function>),
    Class(Rc<Class>),
    ExceptionKind(Rc<ExceptionKind>),
    NativeIterator(Rc<RefCell<NativeIterator>>),
    GeneratorObject(Rc<RefCell<GeneratorObject>>),
    Module(Rc<Module>),
    Opaque(Rc<Opaque>),
    MutableString(Rc<RefCell<String>>),
    MutableList(Rc<RefCell<Vec<Value>>>),
    MutableSet(Rc<RefCell<VSet>>),
    MutableMap(Rc<RefCell<VMap>>),
    MutableUserObject(Rc<MutableUserObject>),
    Cell(Rc<RefCell<Value>>),
}

Variants

Uninitialized
Nil
Bool(bool)
Int(i64)
Float(f64)
Symbol(Symbol)
String(RcStr)
Bytes(Rc<Vec<u8>>)
Path(RcPath)
List(Rc<Vec<Value>>)
Table(Rc<Table>)
Set(Rc<VSet>)
Map(Rc<VMap>)
UserObject(Rc<UserObject>)
Exception(Rc<Exception>)
NativeFunction(Rc<NativeFunction>)
NativeClosure(Rc<NativeClosure>)
Code(Rc<Code>)
Function(Rc<Function>)
Class(Rc<Class>)
ExceptionKind(Rc<ExceptionKind>)
NativeIterator(Rc<RefCell<NativeIterator>>)
GeneratorObject(Rc<RefCell<GeneratorObject>>)
Module(Rc<Module>)
Opaque(Rc<Opaque>)
MutableString(Rc<RefCell<String>>)
MutableList(Rc<RefCell<Vec<Value>>>)
MutableSet(Rc<RefCell<VSet>>)
MutableMap(Rc<RefCell<VMap>>)
MutableUserObject(Rc<MutableUserObject>)
Cell(Rc<RefCell<Value>>)

Implementations

impl Value[src]

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

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

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

pub fn int(&self) -> Option<i64>[src]

pub fn float(&self) -> Option<f64>[src]

pub fn floatlike(&self) -> Option<f64>[src]

pub fn symbol(&self) -> Option<Symbol>[src]

pub fn string(&self) -> Option<&RcStr>[src]

pub fn path(&self) -> Option<&RcPath>[src]

pub fn pathlike(&self) -> Option<&Path>[src]

pub fn list(&self) -> Option<&Rc<Vec<Value>>>[src]

pub fn table(&self) -> Option<&Rc<Table>>[src]

pub fn set(&self) -> Option<&Rc<VSet>>[src]

pub fn map(&self) -> Option<&Rc<VMap>>[src]

pub fn module(&self) -> Option<&Rc<Module>>[src]

pub fn mutable_string(&self) -> Option<&Rc<RefCell<String>>>[src]

pub fn mutable_list(&self) -> Option<&Rc<RefCell<Vec<Value>>>>[src]

pub fn mutable_set(&self) -> Option<&Rc<RefCell<VSet>>>[src]

pub fn mutable_map(&self) -> Option<&Rc<RefCell<VMap>>>[src]

pub fn cell(&self) -> Option<&Rc<RefCell<Value>>>[src]

pub fn kind(&self) -> ValueKind[src]

Trait Implementations

impl Clone for Value[src]

impl Debug for Value[src]

impl Default for Value[src]

impl Display for Value[src]

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

impl<'a> From<&'a Rc<Vec<Value>>> for Value[src]

impl From<GMap<Globals, Value, (), Eval, Eval, ErrorIndicator>> for Value[src]

impl From<GMap<Globals, Value, Value, Eval, Eval, ErrorIndicator>> for Value[src]

impl From<NativeFunction> for Value[src]

impl From<NativeIterator> for Value[src]

impl From<Opaque> for Value[src]

impl From<Rc<Class>> for Value[src]

impl From<Rc<GMap<Globals, Value, (), Eval, Eval, ErrorIndicator>>> for Value[src]

impl From<Rc<GMap<Globals, Value, Value, Eval, Eval, ErrorIndicator>>> for Value[src]

impl From<Rc<MutableUserObject>> for Value[src]

impl From<Rc<NativeFunction>> for Value[src]

impl From<Rc<Opaque>> for Value[src]

impl From<Rc<RefCell<NativeIterator>>> for Value[src]

impl From<Rc<UserObject>> for Value[src]

impl From<Rc<Vec<Value>>> for Value[src]

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

impl From<Vec<Value>> for Value[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.