pub struct Object {
pub inner: Rc<MutCell<ObjectBlock>>,
}Fields§
§inner: Rc<MutCell<ObjectBlock>>Implementations§
Source§impl Object
impl Object
pub fn new<T: RynaData>(data: T) -> Self
pub fn get_ptr(&self) -> *mut ObjectBlock
pub fn arr(elements: Vec<Object>, elem_type: Type) -> Self
pub fn arr_it( c_type: Type, it_type: Type, block: Rc<MutCell<ObjectBlock>>, pos: usize, ) -> Self
pub fn lambda( loc: usize, captures: Vec<Object>, args_type: Type, ret_type: Type, ) -> Self
pub fn tuple(elements: Vec<Object>, elem_types: Vec<Type>) -> Self
pub fn file(path: PathBuf) -> Self
pub fn instance(attributes: Vec<Object>, params: Vec<Type>, id: usize) -> Self
pub fn get<T>(&self) -> &Twhere
ObjectBlock: Get<T>,
pub fn deref<T>(&self) -> &mut T
pub fn ref_count(&self) -> usize
pub fn deref_ref_count(&self) -> usize
pub fn is_moved(&self) -> bool
pub fn is_moved_deref(&self) -> bool
pub fn to_ffi(&self) -> Result<FFIValue, String>
pub fn move_contents(&self) -> Object
pub fn move_contents_if_ref(&self) -> Object
pub fn unsafe_move_contents(&self) -> Object
pub fn swap_contents(&self, other: &Object)
pub fn drop_contents(&self)
pub fn assign(&self, other_obj: Object, ctx: &RynaContext) -> Result<(), String>
pub fn assign_direct( &self, other_obj: Object, ctx: &RynaContext, ) -> Result<(), String>
pub fn from_inner(inner: Rc<MutCell<ObjectBlock>>) -> Self
pub fn no_value() -> Object
pub fn empty() -> Object
pub fn get_ref(&self) -> Object
pub fn get_var(&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 deref_if_ref(&self) -> Object
pub fn deref_deep_clone(&self) -> Object
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<'de> Deserialize<'de> for Object
impl<'de> Deserialize<'de> for Object
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
impl Eq for Object
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Freeze for Object
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<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