pub struct RefValue { /* private fields */ }
Implementations
sourceimpl RefValue
impl RefValue
sourcepub fn create_method(&self, method_name: &str) -> Result<RefValue, String>
pub fn create_method(&self, method_name: &str) -> Result<RefValue, String>
Creates a callable Method object from a RefValue and a given method name.
sourcepub fn call_method(
&self,
name: &str,
args: Vec<RefValue>
) -> Result<Option<RefValue>, String>
pub fn call_method(
&self,
name: &str,
args: Vec<RefValue>
) -> Result<Option<RefValue>, String>
Performs a direct method call on a value.
This function is designed to invoke methods on values directly from Rust code.
pub fn unary_op(self, op: &str) -> Result<RefValue, String>
pub fn binary_op(self, operand: RefValue, op: &str) -> Result<RefValue, String>
Trait Implementations
sourceimpl From<Box<dyn Object + 'static, Global>> for RefValue
impl From<Box<dyn Object + 'static, Global>> for RefValue
sourcefn from(value: BoxedObject) -> Self
fn from(value: BoxedObject) -> Self
Converts to this type from the input type.
sourceimpl Object for RefValue
impl Object for RefValue
sourcefn is_callable(&self, without_arguments: bool) -> bool
fn is_callable(&self, without_arguments: bool) -> bool
Check whether the object is callable.
sourcefn is_consuming(&self) -> bool
fn is_consuming(&self) -> bool
Check whether the object is consuming
sourcefn is_nullable(&self) -> bool
fn is_nullable(&self) -> bool
Check whether the object is nullable
sourceimpl PartialOrd<RefValue> for RefValue
impl PartialOrd<RefValue> for RefValue
sourcefn partial_cmp(&self, other: &RefValue) -> Option<Ordering>
fn partial_cmp(&self, other: &RefValue) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl StructuralPartialEq for RefValue
Auto Trait Implementations
impl !RefUnwindSafe for RefValue
impl !Send for RefValue
impl !Sync for RefValue
impl Unpin for RefValue
impl !UnwindSafe for RefValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more