pub enum Object {
Literal(Literal),
Function(Function),
NativeFunction(NativeFunction),
Class(Rc<RefCell<Class>>),
Instance(Rc<RefCell<Instance>>),
}Expand description
Represents an object that can be stored in a variable or returned from a function. This is an enum that wraps all the possible types of values in the language.
Variants§
Literal(Literal)
Function(Function)
NativeFunction(NativeFunction)
Class(Rc<RefCell<Class>>)
Instance(Rc<RefCell<Instance>>)
Implementations§
Trait Implementations§
Source§impl From<NativeFunction> for Object
impl From<NativeFunction> for Object
Source§fn from(value: NativeFunction) -> Self
fn from(value: NativeFunction) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Object
impl !Send for Object
impl !Sync for Object
impl !UnwindSafe for Object
impl Freeze for Object
impl Unpin for Object
impl UnsafeUnpin for Object
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