pub trait ScriptInvocation {
// Required methods
fn invoke(
origin: Origin,
lhs: Arg,
arguments: &mut [Arg],
) -> RuntimeResult<Cell>;
fn hint() -> Option<&'static InvocationMeta>;
}
Expand description
A script invocation operator: foo(arg1, arg2, arg3)
.
Implementing this trait enables the Object::invoke operation.
The trait must be implemented for the registered type, and the implementation must be exported using the export macro. For more details, see the module documentation.
Required Methods§
Sourcefn invoke(
origin: Origin,
lhs: Arg,
arguments: &mut [Arg],
) -> RuntimeResult<Cell>
fn invoke( origin: Origin, lhs: Arg, arguments: &mut [Arg], ) -> RuntimeResult<Cell>
Operation implementation.
The parameters and return type of this function correspond to those of the Object::invoke function.
Sourcefn hint() -> Option<&'static InvocationMeta>
fn hint() -> Option<&'static InvocationMeta>
Returns the invocation signature description.
The function returns None if the signature is fully dynamic.
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.