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<MutCell<ObjectBlock>>),
Mut(Rc<MutCell<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<MutCell<ObjectBlock>>)
Mut(Rc<MutCell<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<MutCell<ObjectBlock>>
pub fn assign_ref( &mut self, other: ObjectBlock, ctx: &NessaContext, ) -> Result<(), String>
pub fn assign( &mut self, other: ObjectBlock, ctx: &NessaContext, ) -> Result<(), String>
pub fn deep_clone(&self) -> Self
Trait Implementations§
Source§impl Clone for ObjectBlock
impl Clone for ObjectBlock
Source§fn clone(&self) -> ObjectBlock
fn clone(&self) -> ObjectBlock
Returns a duplicate 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) -> &mut NessaArray
Source§impl Deref<NessaArrayIt> for ObjectBlock
impl Deref<NessaArrayIt> for ObjectBlock
fn deref(&self) -> &mut NessaArrayIt
Source§impl Deref<NessaLambda> for ObjectBlock
impl Deref<NessaLambda> for ObjectBlock
fn deref(&self) -> &mut NessaLambda
Source§impl Deref<NessaTuple> for ObjectBlock
impl Deref<NessaTuple> for ObjectBlock
fn deref(&self) -> &mut NessaTuple
Source§impl Deref<TypeInstance> for ObjectBlock
impl Deref<TypeInstance> for ObjectBlock
fn deref(&self) -> &mut TypeInstance
Source§impl<'de> Deserialize<'de> for ObjectBlock
impl<'de> Deserialize<'de> for ObjectBlock
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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§impl Serialize for ObjectBlock
impl Serialize for ObjectBlock
impl Eq for ObjectBlock
impl StructuralPartialEq for ObjectBlock
Auto Trait Implementations§
impl Freeze for ObjectBlock
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more