[−][src]Enum zub::vm::value::object::Object
Variants
String(String)
Function(Function)
NativeFunction(NativeFunction)
Closure(Closure)
List(List)
Dict(Dict)
Implementations
impl Object
[src]
pub fn as_string(&self) -> Option<&String>
[src]
pub fn as_closure(&self) -> Option<&Closure>
[src]
pub fn as_function(&self) -> Option<&Function>
[src]
pub fn as_list(&self) -> Option<&List>
[src]
pub fn as_dict(&self) -> Option<&Dict>
[src]
pub fn native_fn(
name: &str,
arity: u8,
function: fn(_: &mut Heap<Object>, _: &[Value]) -> Value
) -> Self
[src]
name: &str,
arity: u8,
function: fn(_: &mut Heap<Object>, _: &[Value]) -> Value
) -> Self
pub fn as_closure_mut(&mut self) -> Option<&mut Closure>
[src]
Trait Implementations
impl Debug for Object
[src]
impl Trace<Object> for Value
[src]
impl Trace<Object> for Object
[src]
impl Trace<Object> for Function
[src]
impl Trace<Object> for Dict
[src]
impl Trace<Object> for List
[src]
impl Trace<Object> for Closure
[src]
impl Trace<Object> for Chunk
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Object
impl !Send for Object
impl !Sync for Object
impl Unpin for Object
impl !UnwindSafe for Object
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,