pub struct MetaCallObject { /* private fields */ }Expand description
Represents MetaCall Object. You can get this type when returned by a function or create one from a class with create_object.
Implementations§
Source§impl MetaCallObject
impl MetaCallObject
Sourcepub fn get_attribute_untyped(
&self,
name: impl ToString,
) -> Result<Box<dyn MetaCallValue>, MetaCallGetAttributeError>
pub fn get_attribute_untyped( &self, name: impl ToString, ) -> Result<Box<dyn MetaCallValue>, MetaCallGetAttributeError>
Gets attribute from an object without type casting(MetaCallValue).
Sourcepub fn get_attribute<T: MetaCallValue>(
&self,
name: impl ToString,
) -> Result<T, MetaCallGetAttributeError>
pub fn get_attribute<T: MetaCallValue>( &self, name: impl ToString, ) -> Result<T, MetaCallGetAttributeError>
Gets attribute from an object.
Sourcepub fn set_attribute(
&self,
key: impl ToString,
value: impl MetaCallValue,
) -> Result<(), MetaCallSetAttributeError>
pub fn set_attribute( &self, key: impl ToString, value: impl MetaCallValue, ) -> Result<(), MetaCallSetAttributeError>
Sets object attribute.
Sourcepub fn call_method_untyped<T: MetaCallValue>(
&self,
key: impl ToString,
args: impl IntoIterator<Item = T>,
) -> Result<Box<dyn MetaCallValue>, MetaCallError>
pub fn call_method_untyped<T: MetaCallValue>( &self, key: impl ToString, args: impl IntoIterator<Item = T>, ) -> Result<Box<dyn MetaCallValue>, MetaCallError>
Calls an object method witout type casting(MetaCallValue).
Sourcepub fn call_method_untyped_no_arg<T: MetaCallValue>(
&self,
key: impl ToString,
) -> Result<Box<dyn MetaCallValue>, MetaCallError>
pub fn call_method_untyped_no_arg<T: MetaCallValue>( &self, key: impl ToString, ) -> Result<Box<dyn MetaCallValue>, MetaCallError>
Calls an object method witout type casting(MetaCallValue) and without passing arguments.
Sourcepub fn call_method<T: MetaCallValue, U: MetaCallValue>(
&self,
key: impl ToString,
args: impl IntoIterator<Item = U>,
) -> Result<T, MetaCallError>
pub fn call_method<T: MetaCallValue, U: MetaCallValue>( &self, key: impl ToString, args: impl IntoIterator<Item = U>, ) -> Result<T, MetaCallError>
Calls an object method.
Sourcepub fn call_method_no_arg<T: MetaCallValue>(
&self,
key: impl ToString,
) -> Result<T, MetaCallError>
pub fn call_method_no_arg<T: MetaCallValue>( &self, key: impl ToString, ) -> Result<T, MetaCallError>
Calls an object method without passing arguments.
Trait Implementations§
Source§impl Clone for MetaCallObject
impl Clone for MetaCallObject
Source§impl Debug for MetaCallObject
impl Debug for MetaCallObject
Source§impl Drop for MetaCallObject
impl Drop for MetaCallObject
impl MetaCallValue for MetaCallObject
Equivalent to MetaCall object type.
impl Send for MetaCallObject
impl Sync for MetaCallObject
Auto Trait Implementations§
impl Freeze for MetaCallObject
impl RefUnwindSafe for MetaCallObject
impl Unpin for MetaCallObject
impl UnwindSafe for MetaCallObject
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