pub enum Variable {
Show 17 variants
Ref(usize),
Return,
Bool(bool, Option<Box<Vec<Variable>>>),
F64(f64, Option<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>>>),
}
Expand description
Dyon variable.
Variants§
Ref(usize)
Reference.
Return
Return handle.
Bool(bool, Option<Box<Vec<Variable>>>)
Boolean.
F64(f64, Option<Box<Vec<Variable>>>)
F64.
Vec4([f32; 4])
4D vector.
Mat4(Box<[[f32; 4]; 4]>)
4D matrix.
Str(Arc<String>)
Text.
Array(Array)
Array.
Object(Object)
Object.
Link(Box<Link>)
Link.
UnsafeRef(UnsafeRef)
Unsafe reference.
RustObject(RustObject)
Rust object.
Option(Option<Box<Variable>>)
Option.
Result(Result<Box<Variable>, Box<Error>>)
Result.
Thread(Thread)
Thread handle.
Closure(Arc<Closure>, Box<ClosureEnvironment>)
Stores closure together with a closure environment, which makes sure that the closure can be called correctly no matter where it goes.
In(Arc<Mutex<Receiver<Variable>>>)
In-type.
Implementations§
Trait Implementations§
source§impl PartialEq<Variable> for Variable
impl PartialEq<Variable> for Variable
source§impl PopVariable for Variable
impl PopVariable for Variable
source§impl PushVariable for Variable
impl PushVariable for Variable
impl Send for Variable
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more