[][src]Enum dyon::Variable

pub enum Variable {
    Ref(usize),
    Return,
    Bool(boolOption<Box<Vec<Variable>>>),
    F64(f64Option<Box<Vec<Variable>>>),
    Vec4([f32; 4]),
    Mat4(Box<[[f32; 4]; 4]>),
    Str(Arc<String>),
    Array(Array),
    Object(Object),
    Link(Box<Link>),
    UnsafeRef(UnsafeRef),
    RustObject(RustObject),
    Option(Option<Box<Variable>>),
    Result(Result<Box<Variable>, Box<Error>>),
    Thread(Thread),
    Closure(Arc<Closure>, Box<ClosureEnvironment>),
    In(Arc<Mutex<Receiver<Variable>>>),
}

Dyon variable.

Variants

Ref(usize)

Reference.

Return

Return handle.

Boolean.

F64.

Vec4([f32; 4])

4D vector.

4D matrix.

Str(Arc<String>)

Text.

Array(Array)

Array.

Object(Object)

Object.

Link.

UnsafeRef(UnsafeRef)

Unsafe reference.

RustObject(RustObject)

Rust object.

Option(Option<Box<Variable>>)

Option.

Result.

Thread(Thread)

Thread handle.

Stores closure together with a closure environment, which makes sure that the closure can be called correctly no matter where it goes.

In-type.

Implementations

impl Variable[src]

pub fn f64(val: f64) -> Variable[src]

Creates a variable of type f64.

pub fn bool(val: bool) -> Variable[src]

Creates a variable of type bool.

pub fn typeof_var(&self) -> Arc<String>[src]

Returns type of variable.

Trait Implementations

impl Clone for Variable[src]

impl Debug for Variable[src]

impl PartialEq<Variable> for Variable[src]

impl PopVariable for Variable[src]

impl PushVariable for Variable[src]

impl Send for Variable[src]

This is requires because UnsafeRef(*mut Variable) can not be sent across threads. The lack of UnsafeRef variant when sending across threads is guaranteed at language level. The interior of UnsafeRef can not be accessed outside this library.

Auto Trait Implementations

impl !RefUnwindSafe for Variable

impl !Sync for Variable

impl Unpin for Variable

impl !UnwindSafe for Variable

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, 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.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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