[][src]Function glsp::call

pub fn call<C, A, R>(receiver: &C, args: A) -> Result<R, GError> where
    C: CallableOps,
    R: FromVal,
    A: IntoCallArgs

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])?;