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§

source

fn call(&self, this: TInstance<'_, C>, args: Varargs<'_>) -> Variant

Calls the method on this with args.

Provided Methods§

source

fn site() -> Option<Site<'static>>

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

Default implementation returns None.

Implementors§