pub struct Object {
pub inner: Rc<RefCell<ObjectBlock>>,
}Fields§
§inner: Rc<RefCell<ObjectBlock>>Implementations§
source§impl Object
impl Object
pub fn new<T: NessaData>(data: T) -> Self
pub fn get_ptr(&self) -> *mut ObjectBlock
pub fn arr(elements: Vec<Object>, elem_type: Type) -> Self
pub fn arr_it( it_type: Type, block: Rc<RefCell<ObjectBlock>>, pos: usize ) -> Self
pub fn lambda(loc: usize, args_type: Type, ret_type: Type) -> Self
pub fn tuple(elements: Vec<Object>, elem_types: Vec<Type>) -> Self
pub fn file(file: File) -> Self
pub fn instance(attributes: Vec<Object>, params: Vec<Type>, id: usize) -> Self
pub fn get<T>(&self) -> Ref<'_, T>where
ObjectBlock: Get<T>,
pub fn deref<T>(&self) -> RefMut<'_, T>
pub fn ref_count(&self) -> usize
pub fn is_moved(&self) -> bool
pub fn move_contents(&self) -> Object
pub fn swap_contents(&self, other: &Object)
pub fn drop_contents(&self)
pub fn assign( &self, other_obj: Object, ctx: &NessaContext ) -> Result<(), String>
pub fn from_inner(inner: Rc<RefCell<ObjectBlock>>) -> Self
pub fn no_value() -> Object
pub fn empty() -> Object
pub fn get_ref(&self) -> Object
pub fn get_mut(&self) -> Object
pub fn get_ref_nostack(&self) -> Object
pub fn get_mut_nostack(&self) -> Object
pub fn to_debug_string(&self) -> String
pub fn deep_clone(&self) -> Object
pub fn get_type_id(&self) -> usize
pub fn get_type(&self) -> Type
pub fn deref_obj(&self) -> Object
Trait Implementations§
source§impl PartialEq for Object
impl PartialEq for Object
impl Eq for Object
impl StructuralPartialEq for Object
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§
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.