Enum nessa::object::ObjectBlock
source · pub enum ObjectBlock {
Show 14 variants
NoValue,
Empty,
Int(Integer),
Float(f64),
Str(String),
Bool(bool),
Tuple(NessaTuple),
Array(NessaArray),
ArrayIter(NessaArrayIt),
Lambda(NessaLambda),
File(NessaFile),
Instance(TypeInstance),
Ref(Rc<RefCell<ObjectBlock>>),
Mut(Rc<RefCell<ObjectBlock>>),
}Variants§
NoValue
Empty
Int(Integer)
Float(f64)
Str(String)
Bool(bool)
Tuple(NessaTuple)
Array(NessaArray)
ArrayIter(NessaArrayIt)
Lambda(NessaLambda)
File(NessaFile)
Instance(TypeInstance)
Ref(Rc<RefCell<ObjectBlock>>)
Mut(Rc<RefCell<ObjectBlock>>)
Implementations§
source§impl ObjectBlock
impl ObjectBlock
pub fn to_obj(self) -> Object
pub fn get_type_id(&self) -> usize
pub fn get_type(&self) -> Type
pub fn is_moved(&self) -> bool
pub fn get_inner<T>(&self) -> &Twhere
ObjectBlock: Get<T>,
pub fn mut_inner<T>(&mut self) -> &mut Twhere
ObjectBlock: GetMut<T>,
pub fn dereference(&self) -> &Rc<RefCell<ObjectBlock>>
pub fn assign( &mut self, other: ObjectBlock, ctx: &NessaContext ) -> Result<(), String>
Trait Implementations§
source§impl Clone for ObjectBlock
impl Clone for ObjectBlock
source§fn clone(&self) -> ObjectBlock
fn clone(&self) -> ObjectBlock
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ObjectBlock
impl Debug for ObjectBlock
source§impl Default for ObjectBlock
impl Default for ObjectBlock
source§fn default() -> ObjectBlock
fn default() -> ObjectBlock
Returns the “default value” for a type. Read more
source§impl Deref<NessaArray> for ObjectBlock
impl Deref<NessaArray> for ObjectBlock
fn deref(&self) -> Ref<'_, NessaArray>
source§impl Deref<NessaArrayIt> for ObjectBlock
impl Deref<NessaArrayIt> for ObjectBlock
fn deref(&self) -> Ref<'_, NessaArrayIt>
source§impl Deref<NessaLambda> for ObjectBlock
impl Deref<NessaLambda> for ObjectBlock
fn deref(&self) -> Ref<'_, NessaLambda>
source§impl Deref<NessaTuple> for ObjectBlock
impl Deref<NessaTuple> for ObjectBlock
fn deref(&self) -> Ref<'_, NessaTuple>
source§impl Deref<TypeInstance> for ObjectBlock
impl Deref<TypeInstance> for ObjectBlock
fn deref(&self) -> Ref<'_, TypeInstance>
source§impl Get<NessaArray> for ObjectBlock
impl Get<NessaArray> for ObjectBlock
fn get(&self) -> &NessaArray
source§impl Get<NessaArrayIt> for ObjectBlock
impl Get<NessaArrayIt> for ObjectBlock
fn get(&self) -> &NessaArrayIt
source§impl Get<NessaLambda> for ObjectBlock
impl Get<NessaLambda> for ObjectBlock
fn get(&self) -> &NessaLambda
source§impl Get<NessaTuple> for ObjectBlock
impl Get<NessaTuple> for ObjectBlock
fn get(&self) -> &NessaTuple
source§impl Get<TypeInstance> for ObjectBlock
impl Get<TypeInstance> for ObjectBlock
fn get(&self) -> &TypeInstance
source§impl GetMut<NessaArray> for ObjectBlock
impl GetMut<NessaArray> for ObjectBlock
fn get(&mut self) -> &mut NessaArray
source§impl GetMut<NessaArrayIt> for ObjectBlock
impl GetMut<NessaArrayIt> for ObjectBlock
fn get(&mut self) -> &mut NessaArrayIt
source§impl GetMut<NessaLambda> for ObjectBlock
impl GetMut<NessaLambda> for ObjectBlock
fn get(&mut self) -> &mut NessaLambda
source§impl GetMut<NessaTuple> for ObjectBlock
impl GetMut<NessaTuple> for ObjectBlock
fn get(&mut self) -> &mut NessaTuple
source§impl GetMut<TypeInstance> for ObjectBlock
impl GetMut<TypeInstance> for ObjectBlock
fn get(&mut self) -> &mut TypeInstance
source§impl PartialEq for ObjectBlock
impl PartialEq for ObjectBlock
source§fn eq(&self, other: &ObjectBlock) -> bool
fn eq(&self, other: &ObjectBlock) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for ObjectBlock
impl StructuralPartialEq for ObjectBlock
Auto Trait Implementations§
impl !RefUnwindSafe for ObjectBlock
impl !Send for ObjectBlock
impl !Sync for ObjectBlock
impl Unpin for ObjectBlock
impl !UnwindSafe for ObjectBlock
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.