[−][src]Trait rosy::Object
Some concrete Ruby object.
Safety
All types that implement this trait must be light wrappers around an
AnyObject and thus have the same size and layout.
Provided methods
fn unique_id() -> Option<u128>
Returns a unique identifier for an object type to facilitate casting.
Safety
This value must be unique. Rosy's built-in objects use identifiers
that are very close to u128::max_value(), so those are easy to avoid.
unsafe fn from_raw(raw: usize) -> Self
Creates a new object from raw without checking.
Safety
The following invariants must be upheld:
- The value came from the Ruby VM
- The value is a valid representation of
Self
Not following this will lead to nasal demons. You've been warned.
fn cast<A: Object>(obj: A) -> Option<Self>
Attempts to create an instance by casting obj.
The default implementation checks the unique_id
of A against that of Self.
unsafe fn cast_unchecked(obj: impl Object) -> Self
Casts obj to Self without checking its type.
fn into_any_object(self) -> AnyObject
Returns self as an AnyObject.
fn as_any_object(&self) -> &AnyObject
Returns a reference to self as an AnyObject.
fn as_any_slice(&self) -> &[AnyObject]
Returns self as a reference to a single-element slice.
fn raw(self) -> usize
Returns the raw object pointer.
unsafe fn as_unchecked<O: Object>(&self) -> &O
Casts self to O without checking whether it is one.
unsafe fn into_unchecked<O: Object>(self) -> O
Converts self to O without checking whether it is one.
fn id(self) -> u64
Returns the object's identifier.
fn ty(self) -> Ty
Returns the virtual type of self.
fn is_ty(self, ty: Ty) -> bool
Returns whether the virtual type of self is ty.
fn class(self) -> Class<Self>
Returns the Class for self.
Note that if Self implements Classify, Self::class() may not be
equal to the result of this method.
fn singleton_class(self) -> Class<Self>
Returns the singleton Class of self, creating one if it doesn't
exist already.
Note that Class::new_instance does not work on singleton classes due
to the class being attached to the specific object instance for self.
fn mark(self)
Marks self for Ruby to avoid garbage collecting it.
unsafe fn force_recycle(self)
Forces the garbage collector to free the contents of self.
Safety
The caller must ensure that self does not have ownership over any
currently-referenced memory.
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>,
N: Into<SymbolId>,
F: MethodFn<Self>,
Defines a method for name on the singleton class of self that calls
f when invoked.
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>,
N: Into<SymbolId>,
F: MethodFn<Self>,
Defines a method for name on the singleton class of self that calls
f when invoked.
Safety
The caller must ensure that self is not frozen or else a FrozenError
exception will be raised.
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>
Calls method on self and returns the result.
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject
Calls method on self and returns the result.
Safety
An exception will be raised if method is not defined on self.
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
Calls method on self with args and returns the result.
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
Calls method on self with args and returns the result.
Safety
An exception will be raised if method is not defined on self.
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>
Calls the public method on self and returns the result.
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject
Calls the public method on self and returns the result.
Safety
An exception will be raised if either method is not defined on self
or method is not publicly callable.
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
Calls the public method on self with args and returns the result.
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
Calls the public method on self with args and returns the result.
Safety
An exception will be raised if either method is not defined on self
or method is not publicly callable.
fn inspect(self) -> String
Returns a printable string representation of self.
Examples
use rosy::{Object, Class}; let a = Class::array(); assert_eq!(a.inspect(), a.call("inspect").unwrap());
fn to_s(self) -> String
Returns the result of calling the to_s method on self.
fn is_frozen(self) -> bool
Returns whether modifications can be made to self.
fn freeze(self)
Freezes self, preventing any further mutations.
fn is_eql<O: Object>(self, other: &O) -> bool
Returns whether self is equal to other in terms of the eql?
method.
Implementors
impl Object for AnyException[src]
fn cast<A: Object>(obj: A) -> Option<Self>[src]
fn unique_id() -> Option<u128>[src]
unsafe fn from_raw(raw: usize) -> Self[src]
unsafe fn cast_unchecked(obj: impl Object) -> Self[src]
fn into_any_object(self) -> AnyObject[src]
fn as_any_object(&self) -> &AnyObject[src]
fn as_any_slice(&self) -> &[AnyObject][src]
fn raw(self) -> usize[src]
unsafe fn as_unchecked<O: Object>(&self) -> &O[src]
unsafe fn into_unchecked<O: Object>(self) -> O[src]
fn id(self) -> u64[src]
fn ty(self) -> Ty[src]
fn is_ty(self, ty: Ty) -> bool[src]
fn class(self) -> Class<Self>[src]
fn singleton_class(self) -> Class<Self>[src]
fn mark(self)[src]
unsafe fn force_recycle(self)[src]
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn inspect(self) -> String[src]
fn to_s(self) -> String[src]
fn is_frozen(self) -> bool[src]
fn freeze(self)[src]
fn is_eql<O: Object>(self, other: &O) -> bool[src]
impl Object for Float[src]
fn unique_id() -> Option<u128>[src]
fn cast<A: Object>(object: A) -> Option<Self>[src]
fn ty(self) -> Ty[src]
fn is_ty(self, ty: Ty) -> bool[src]
unsafe fn from_raw(raw: usize) -> Self[src]
unsafe fn cast_unchecked(obj: impl Object) -> Self[src]
fn into_any_object(self) -> AnyObject[src]
fn as_any_object(&self) -> &AnyObject[src]
fn as_any_slice(&self) -> &[AnyObject][src]
fn raw(self) -> usize[src]
unsafe fn as_unchecked<O: Object>(&self) -> &O[src]
unsafe fn into_unchecked<O: Object>(self) -> O[src]
fn id(self) -> u64[src]
fn class(self) -> Class<Self>[src]
fn singleton_class(self) -> Class<Self>[src]
fn mark(self)[src]
unsafe fn force_recycle(self)[src]
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn inspect(self) -> String[src]
fn to_s(self) -> String[src]
fn is_frozen(self) -> bool[src]
fn freeze(self)[src]
fn is_eql<O: Object>(self, other: &O) -> bool[src]
impl Object for Integer[src]
fn unique_id() -> Option<u128>[src]
fn cast<A: Object>(object: A) -> Option<Self>[src]
fn ty(self) -> Ty[src]
fn is_ty(self, ty: Ty) -> bool[src]
unsafe fn from_raw(raw: usize) -> Self[src]
unsafe fn cast_unchecked(obj: impl Object) -> Self[src]
fn into_any_object(self) -> AnyObject[src]
fn as_any_object(&self) -> &AnyObject[src]
fn as_any_slice(&self) -> &[AnyObject][src]
fn raw(self) -> usize[src]
unsafe fn as_unchecked<O: Object>(&self) -> &O[src]
unsafe fn into_unchecked<O: Object>(self) -> O[src]
fn id(self) -> u64[src]
fn class(self) -> Class<Self>[src]
fn singleton_class(self) -> Class<Self>[src]
fn mark(self)[src]
unsafe fn force_recycle(self)[src]
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn inspect(self) -> String[src]
fn to_s(self) -> String[src]
fn is_frozen(self) -> bool[src]
fn freeze(self)[src]
fn is_eql<O: Object>(self, other: &O) -> bool[src]
impl Object for Encoding[src]
fn cast<A: Object>(obj: A) -> Option<Self>[src]
fn unique_id() -> Option<u128>[src]
unsafe fn from_raw(raw: usize) -> Self[src]
unsafe fn cast_unchecked(obj: impl Object) -> Self[src]
fn into_any_object(self) -> AnyObject[src]
fn as_any_object(&self) -> &AnyObject[src]
fn as_any_slice(&self) -> &[AnyObject][src]
fn raw(self) -> usize[src]
unsafe fn as_unchecked<O: Object>(&self) -> &O[src]
unsafe fn into_unchecked<O: Object>(self) -> O[src]
fn id(self) -> u64[src]
fn ty(self) -> Ty[src]
fn is_ty(self, ty: Ty) -> bool[src]
fn class(self) -> Class<Self>[src]
fn singleton_class(self) -> Class<Self>[src]
fn mark(self)[src]
unsafe fn force_recycle(self)[src]
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn inspect(self) -> String[src]
fn to_s(self) -> String[src]
fn is_frozen(self) -> bool[src]
fn freeze(self)[src]
fn is_eql<O: Object>(self, other: &O) -> bool[src]
impl Object for String[src]
fn unique_id() -> Option<u128>[src]
fn cast<A: Object>(obj: A) -> Option<Self>[src]
fn ty(self) -> Ty[src]
fn is_ty(self, ty: Ty) -> bool[src]
unsafe fn from_raw(raw: usize) -> Self[src]
unsafe fn cast_unchecked(obj: impl Object) -> Self[src]
fn into_any_object(self) -> AnyObject[src]
fn as_any_object(&self) -> &AnyObject[src]
fn as_any_slice(&self) -> &[AnyObject][src]
fn raw(self) -> usize[src]
unsafe fn as_unchecked<O: Object>(&self) -> &O[src]
unsafe fn into_unchecked<O: Object>(self) -> O[src]
fn id(self) -> u64[src]
fn class(self) -> Class<Self>[src]
fn singleton_class(self) -> Class<Self>[src]
fn mark(self)[src]
unsafe fn force_recycle(self)[src]
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn inspect(self) -> String[src]
fn to_s(self) -> String[src]
fn is_frozen(self) -> bool[src]
fn freeze(self)[src]
fn is_eql<O: Object>(self, other: &O) -> bool[src]
impl Object for AnyObject[src]
fn unique_id() -> Option<u128>[src]
unsafe fn from_raw(raw: usize) -> Self[src]
fn cast<A: Object>(obj: A) -> Option<Self>[src]
fn ty(self) -> Ty[src]
fn raw(self) -> usize[src]
fn as_any_object(&self) -> &Self[src]
fn into_any_object(self) -> Self[src]
unsafe fn cast_unchecked(obj: impl Object) -> Self[src]
fn as_any_slice(&self) -> &[AnyObject][src]
unsafe fn as_unchecked<O: Object>(&self) -> &O[src]
unsafe fn into_unchecked<O: Object>(self) -> O[src]
fn id(self) -> u64[src]
fn is_ty(self, ty: Ty) -> bool[src]
fn class(self) -> Class<Self>[src]
fn singleton_class(self) -> Class<Self>[src]
fn mark(self)[src]
unsafe fn force_recycle(self)[src]
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn inspect(self) -> String[src]
fn to_s(self) -> String[src]
fn is_frozen(self) -> bool[src]
fn freeze(self)[src]
fn is_eql<O: Object>(self, other: &O) -> bool[src]
impl Object for Module[src]
fn unique_id() -> Option<u128>[src]
fn cast<A: Object>(obj: A) -> Option<Self>[src]
fn ty(self) -> Ty[src]
fn is_ty(self, ty: Ty) -> bool[src]
unsafe fn from_raw(raw: usize) -> Self[src]
unsafe fn cast_unchecked(obj: impl Object) -> Self[src]
fn into_any_object(self) -> AnyObject[src]
fn as_any_object(&self) -> &AnyObject[src]
fn as_any_slice(&self) -> &[AnyObject][src]
fn raw(self) -> usize[src]
unsafe fn as_unchecked<O: Object>(&self) -> &O[src]
unsafe fn into_unchecked<O: Object>(self) -> O[src]
fn id(self) -> u64[src]
fn class(self) -> Class<Self>[src]
fn singleton_class(self) -> Class<Self>[src]
fn mark(self)[src]
unsafe fn force_recycle(self)[src]
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn inspect(self) -> String[src]
fn to_s(self) -> String[src]
fn is_frozen(self) -> bool[src]
fn freeze(self)[src]
fn is_eql<O: Object>(self, other: &O) -> bool[src]
impl Object for Symbol[src]
fn cast<A: Object>(obj: A) -> Option<Self>[src]
fn ty(self) -> Ty[src]
fn is_ty(self, ty: Ty) -> bool[src]
fn unique_id() -> Option<u128>[src]
unsafe fn from_raw(raw: usize) -> Self[src]
unsafe fn cast_unchecked(obj: impl Object) -> Self[src]
fn into_any_object(self) -> AnyObject[src]
fn as_any_object(&self) -> &AnyObject[src]
fn as_any_slice(&self) -> &[AnyObject][src]
fn raw(self) -> usize[src]
unsafe fn as_unchecked<O: Object>(&self) -> &O[src]
unsafe fn into_unchecked<O: Object>(self) -> O[src]
fn id(self) -> u64[src]
fn class(self) -> Class<Self>[src]
fn singleton_class(self) -> Class<Self>[src]
fn mark(self)[src]
unsafe fn force_recycle(self)[src]
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn inspect(self) -> String[src]
fn to_s(self) -> String[src]
fn is_frozen(self) -> bool[src]
fn freeze(self)[src]
fn is_eql<O: Object>(self, other: &O) -> bool[src]
impl Object for InstrSeq[src]
fn unique_id() -> Option<u128>[src]
fn cast<A: Object>(obj: A) -> Option<Self>[src]
unsafe fn from_raw(raw: usize) -> Self[src]
unsafe fn cast_unchecked(obj: impl Object) -> Self[src]
fn into_any_object(self) -> AnyObject[src]
fn as_any_object(&self) -> &AnyObject[src]
fn as_any_slice(&self) -> &[AnyObject][src]
fn raw(self) -> usize[src]
unsafe fn as_unchecked<O: Object>(&self) -> &O[src]
unsafe fn into_unchecked<O: Object>(self) -> O[src]
fn id(self) -> u64[src]
fn ty(self) -> Ty[src]
fn is_ty(self, ty: Ty) -> bool[src]
fn class(self) -> Class<Self>[src]
fn singleton_class(self) -> Class<Self>[src]
fn mark(self)[src]
unsafe fn force_recycle(self)[src]
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn inspect(self) -> String[src]
fn to_s(self) -> String[src]
fn is_frozen(self) -> bool[src]
fn freeze(self)[src]
fn is_eql<O: Object>(self, other: &O) -> bool[src]
impl<K: Object, V: Object> Object for Hash<K, V>[src]
fn unique_id() -> Option<u128>[src]
fn cast<A: Object>(obj: A) -> Option<Self>[src]
fn ty(self) -> Ty[src]
fn is_ty(self, ty: Ty) -> bool[src]
unsafe fn from_raw(raw: usize) -> Self[src]
unsafe fn cast_unchecked(obj: impl Object) -> Self[src]
fn into_any_object(self) -> AnyObject[src]
fn as_any_object(&self) -> &AnyObject[src]
fn as_any_slice(&self) -> &[AnyObject][src]
fn raw(self) -> usize[src]
unsafe fn as_unchecked<O: Object>(&self) -> &O[src]
unsafe fn into_unchecked<O: Object>(self) -> O[src]
fn id(self) -> u64[src]
fn class(self) -> Class<Self>[src]
fn singleton_class(self) -> Class<Self>[src]
fn mark(self)[src]
unsafe fn force_recycle(self)[src]
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn inspect(self) -> String[src]
fn to_s(self) -> String[src]
fn is_frozen(self) -> bool[src]
fn freeze(self)[src]
fn is_eql<O: Object>(self, other: &O) -> bool[src]
impl<O: Object> Object for Array<O>[src]
fn unique_id() -> Option<u128>[src]
fn cast<A: Object>(obj: A) -> Option<Self>[src]
fn ty(self) -> Ty[src]
fn is_ty(self, ty: Ty) -> bool[src]
unsafe fn from_raw(raw: usize) -> Self[src]
unsafe fn cast_unchecked(obj: impl Object) -> Self[src]
fn into_any_object(self) -> AnyObject[src]
fn as_any_object(&self) -> &AnyObject[src]
fn as_any_slice(&self) -> &[AnyObject][src]
fn raw(self) -> usize[src]
unsafe fn as_unchecked<O: Object>(&self) -> &O[src]
unsafe fn into_unchecked<O: Object>(self) -> O[src]
fn id(self) -> u64[src]
fn class(self) -> Class<Self>[src]
fn singleton_class(self) -> Class<Self>[src]
fn mark(self)[src]
unsafe fn force_recycle(self)[src]
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn inspect(self) -> String[src]
fn to_s(self) -> String[src]
fn is_frozen(self) -> bool[src]
fn freeze(self)[src]
fn is_eql<O: Object>(self, other: &O) -> bool[src]
impl<O: Object> Object for Class<O>[src]
fn unique_id() -> Option<u128>[src]
fn cast<A: Object>(obj: A) -> Option<Self>[src]
fn ty(self) -> Ty[src]
fn is_ty(self, ty: Ty) -> bool[src]
unsafe fn from_raw(raw: usize) -> Self[src]
unsafe fn cast_unchecked(obj: impl Object) -> Self[src]
fn into_any_object(self) -> AnyObject[src]
fn as_any_object(&self) -> &AnyObject[src]
fn as_any_slice(&self) -> &[AnyObject][src]
fn raw(self) -> usize[src]
unsafe fn as_unchecked<O: Object>(&self) -> &O[src]
unsafe fn into_unchecked<O: Object>(self) -> O[src]
fn id(self) -> u64[src]
fn class(self) -> Class<Self>[src]
fn singleton_class(self) -> Class<Self>[src]
fn mark(self)[src]
unsafe fn force_recycle(self)[src]
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn inspect(self) -> String[src]
fn to_s(self) -> String[src]
fn is_frozen(self) -> bool[src]
fn freeze(self)[src]
fn is_eql<O: Object>(self, other: &O) -> bool[src]
impl<R: Rosy> Object for RosyObject<R>[src]
fn unique_id() -> Option<u128>[src]
fn cast<A: Object>(obj: A) -> Option<Self>[src]
fn class(self) -> Class<Self>[src]
unsafe fn from_raw(raw: usize) -> Self[src]
unsafe fn cast_unchecked(obj: impl Object) -> Self[src]
fn into_any_object(self) -> AnyObject[src]
fn as_any_object(&self) -> &AnyObject[src]
fn as_any_slice(&self) -> &[AnyObject][src]
fn raw(self) -> usize[src]
unsafe fn as_unchecked<O: Object>(&self) -> &O[src]
unsafe fn into_unchecked<O: Object>(self) -> O[src]
fn id(self) -> u64[src]
fn ty(self) -> Ty[src]
fn is_ty(self, ty: Ty) -> bool[src]
fn singleton_class(self) -> Class<Self>[src]
fn mark(self)[src]
unsafe fn force_recycle(self)[src]
fn def_singleton_method<N, F>(self, name: N, f: F) -> Result where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
unsafe fn def_singleton_method_unchecked<N, F>(self, name: N, f: F) where
N: Into<SymbolId>,
F: MethodFn<Self>, [src]
N: Into<SymbolId>,
F: MethodFn<Self>,
fn call(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject
fn call_public(self, method: impl Into<SymbolId>) -> Result<AnyObject>[src]
unsafe fn call_public_unchecked(self, method: impl Into<SymbolId>) -> AnyObject[src]
fn call_public_with(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> Result<AnyObject>
unsafe fn call_public_with_unchecked(
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject[src]
self,
method: impl Into<SymbolId>,
args: &[impl Object]
) -> AnyObject