pub trait ObjectMethods {
// Required methods
fn object_call(
var: &pxs_Var,
method: &str,
args: &mut pxs_VarList,
) -> Result<pxs_Var, Error>;
fn call_method(
method: &str,
args: &mut pxs_VarList,
) -> Result<pxs_Var, Error>;
fn var_call(
method: &pxs_Var,
args: &mut pxs_VarList,
) -> Result<pxs_Var, Error>;
fn get(var: &pxs_Var, key: &str) -> Result<pxs_Var, Error>;
fn set(var: &pxs_Var, key: &str, value: &pxs_Var) -> Result<pxs_Var, Error>;
}Expand description
Methods for interacting with objects and callbacks from the runtime.
Required Methods§
Sourcefn object_call(
var: &pxs_Var,
method: &str,
args: &mut pxs_VarList,
) -> Result<pxs_Var, Error>
fn object_call( var: &pxs_Var, method: &str, args: &mut pxs_VarList, ) -> Result<pxs_Var, Error>
Call a method on a object.
Sourcefn call_method(method: &str, args: &mut pxs_VarList) -> Result<pxs_Var, Error>
fn call_method(method: &str, args: &mut pxs_VarList) -> Result<pxs_Var, Error>
Call a method and pass in args
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.