Trait jlrs::value::traits::call::Call[][src]

pub trait Call<'scope, 'frame, 'data> {
    fn call0<S, F>(self, scope: S) -> JlrsResult<S::JuliaResult>
    where
        S: Scope<'scope, 'frame, 'data, F>,
        F: Frame<'frame>
;
fn call1<S, F>(
        self,
        scope: S,
        arg0: Value<'_, 'data>
    ) -> JlrsResult<S::JuliaResult>
    where
        S: Scope<'scope, 'frame, 'data, F>,
        F: Frame<'frame>
;
fn call2<S, F>(
        self,
        scope: S,
        arg0: Value<'_, 'data>,
        arg1: Value<'_, 'data>
    ) -> JlrsResult<S::JuliaResult>
    where
        S: Scope<'scope, 'frame, 'data, F>,
        F: Frame<'frame>
;
fn call3<S, F>(
        self,
        scope: S,
        arg0: Value<'_, 'data>,
        arg1: Value<'_, 'data>,
        arg2: Value<'_, 'data>
    ) -> JlrsResult<S::JuliaResult>
    where
        S: Scope<'scope, 'frame, 'data, F>,
        F: Frame<'frame>
;
fn call<'value, V, S, F>(
        self,
        scope: S,
        args: V
    ) -> JlrsResult<S::JuliaResult>
    where
        V: AsMut<[Value<'value, 'data>]>,
        S: Scope<'scope, 'frame, 'data, F>,
        F: Frame<'frame>
; }

A trait that allows something to be called as a Julia function. There are currently two types that implement this trait, Value and WithKeywords. In Julia every value can potentially be a function that can be called, there’s no general way to confirm if it is. WithKeywords is used to call functions that take keyword arguments, keywords can be provided to a function by calling Value::with_keywords. The positional arguments can be provided with this trait’s methods.

Required methods

fn call0<S, F>(self, scope: S) -> JlrsResult<S::JuliaResult> where
    S: Scope<'scope, 'frame, 'data, F>,
    F: Frame<'frame>, 
[src]

Call a function with no arguments.

fn call1<S, F>(
    self,
    scope: S,
    arg0: Value<'_, 'data>
) -> JlrsResult<S::JuliaResult> where
    S: Scope<'scope, 'frame, 'data, F>,
    F: Frame<'frame>, 
[src]

Call a function with one argument.

fn call2<S, F>(
    self,
    scope: S,
    arg0: Value<'_, 'data>,
    arg1: Value<'_, 'data>
) -> JlrsResult<S::JuliaResult> where
    S: Scope<'scope, 'frame, 'data, F>,
    F: Frame<'frame>, 
[src]

Call a function with two arguments.

fn call3<S, F>(
    self,
    scope: S,
    arg0: Value<'_, 'data>,
    arg1: Value<'_, 'data>,
    arg2: Value<'_, 'data>
) -> JlrsResult<S::JuliaResult> where
    S: Scope<'scope, 'frame, 'data, F>,
    F: Frame<'frame>, 
[src]

Call a function with three arguments.

fn call<'value, V, S, F>(self, scope: S, args: V) -> JlrsResult<S::JuliaResult> where
    V: AsMut<[Value<'value, 'data>]>,
    S: Scope<'scope, 'frame, 'data, F>,
    F: Frame<'frame>, 
[src]

Call a function with an arbitrary number arguments.

Loading content...

Implementors

impl<'scope, 'frame, 'data> Call<'scope, 'frame, 'data> for Value<'_, 'data>[src]

impl<'scope, 'frame, 'data> Call<'scope, 'frame, 'data> for WithKeywords<'_, '_, 'data>[src]

Loading content...