pub trait Call<'data>: CallPriv {
    unsafe fn call0<'target, S>(
        self,
        scope: S
    ) -> JlrsResult<JuliaResult<'target, 'data>>
    where
        S: PartialScope<'target>
; unsafe fn call1<'target, S>(
        self,
        scope: S,
        arg0: Value<'_, 'data>
    ) -> JlrsResult<JuliaResult<'target, 'data>>
    where
        S: PartialScope<'target>
; unsafe fn call2<'target, S>(
        self,
        scope: S,
        arg0: Value<'_, 'data>,
        arg1: Value<'_, 'data>
    ) -> JlrsResult<JuliaResult<'target, 'data>>
    where
        S: PartialScope<'target>
; unsafe fn call3<'target, S>(
        self,
        scope: S,
        arg0: Value<'_, 'data>,
        arg1: Value<'_, 'data>,
        arg2: Value<'_, 'data>
    ) -> JlrsResult<JuliaResult<'target, 'data>>
    where
        S: PartialScope<'target>
; unsafe fn call<'target, 'value, V, S>(
        self,
        scope: S,
        args: V
    ) -> JlrsResult<JuliaResult<'target, 'data>>
    where
        V: AsRef<[Value<'value, 'data>]>,
        S: PartialScope<'target>
; unsafe fn call0_unrooted<'target>(
        self,
        _: Global<'target>
    ) -> JuliaResultRef<'target, 'data>; unsafe fn call1_unrooted<'target>(
        self,
        _: Global<'target>,
        arg0: Value<'_, 'data>
    ) -> JuliaResultRef<'target, 'data>; unsafe fn call2_unrooted<'target>(
        self,
        _: Global<'target>,
        arg0: Value<'_, 'data>,
        arg1: Value<'_, 'data>
    ) -> JuliaResultRef<'target, 'data>; unsafe fn call3_unrooted<'target>(
        self,
        _: Global<'target>,
        arg0: Value<'_, 'data>,
        arg1: Value<'_, 'data>,
        arg2: Value<'_, 'data>
    ) -> JuliaResultRef<'target, 'data>; unsafe fn call_unrooted<'target, 'value, V>(
        self,
        _: Global<'target>,
        args: V
    ) -> JuliaResultRef<'target, 'data>
    where
        V: AsRef<[Value<'value, 'data>]>
; }
Expand description

Call the implementor as a Julia function.

There are currently four types that implement this trait: Value, Function, WithKeywords, and OpaqueClosure if the internal-types feature is enabled. Because Value implements this trait it’s not necessary to cast it before calling it.

Constructors can be called with the methods defined by this trait, both the inner and outer constructors of a DataType can be called by converting the DataType to a Value and calling it.

Note that all of these methods are unsafe. There are several reasons for this. First and foremost these methods let you call arbitrary Julia functions which can’t be checked for correctness. If the second lifetime of an argument is not 'static, it must never be assigned to a global. More information can be found in the safety module.

Required Methods

Call a function with no arguments and root the result in scope.

Safety: this method lets you call arbitrary Julia functions which can’t be checked for correctness. More information can be found in the safety module.

Call a function with one argument and root the result in scope.

Safety: this method lets you call arbitrary Julia functions which can’t be checked for correctness. More information can be found in the safety module.

Call a function with two arguments and root the result in scope.

Safety: this method lets you call arbitrary Julia functions which can’t be checked for correctness. More information can be found in the safety module.

Call a function with three arguments and root the result in scope.

Safety: this method lets you call arbitrary Julia functions which can’t be checked for correctness. More information can be found in the safety module.

Call a function with an arbitrary number arguments and root the result in scope.

Safety: this method lets you call arbitrary Julia functions which can’t be checked for correctness. More information can be found in the safety module.

Call a function with no arguments without rooting the result.

Safety: this method lets you call arbitrary Julia functions which can’t be checked for correctness. More information can be found in the safety module.

Call a function with one argument without rooting the result.

Safety: this method lets you call arbitrary Julia functions which can’t be checked for correctness. More information can be found in the safety module.

Call a function with two arguments without rooting the result.

Safety: this method lets you call arbitrary Julia functions which can’t be checked for correctness. More information can be found in the safety module.

Call a function with three arguments without rooting the result.

Safety: this method lets you call arbitrary Julia functions which can’t be checked for correctness. More information can be found in the safety module.

Call a function with an abitrary number of arguments without rooting the result.

Safety: this method lets you call arbitrary Julia functions which can’t be checked for correctness. More information can be found in the safety module.

Implementors