pub trait Method<C: NativeClass>: Send + Sync + 'static {
    fn call(&self, this: TInstance<'_, C>, args: Varargs<'_>) -> Variant;

    fn site() -> Option<Site<'static>> { ... }
}
Expand description

Safe low-level trait for stateful, variadic methods that can be called on a native script type.

Required methods

Calls the method on this with args.

Provided methods

Returns an optional site where this method is defined. Used for logging errors in FFI wrappers.

Default implementation returns None.

Implementors