[][src]Function glsp_engine::call

pub fn call<C, A: ?Sized, R>(receiver: &C, args: &A) -> GResult<R> where
    C: CallableOps,
    A: ToCallArgs,
    R: FromVal

Invokes a callable value: an RFn, GFn or Class.

Note that both the receiver and the args are passed by reference. The args should be a reference to (), a tuple, a slice, or a fixed-size array.

let rect: Root<Obj> = glsp::call(&rect_class, &[10, 10, 50, 50])?;