Struct jlrs::wrappers::ptr::function::Function [−][src]
#[repr(transparent)]pub struct Function<'scope, 'data> { /* fields omitted */ }
Expand description
A Julia function.
Implementations
Trait Implementations
unsafe fn call0<'target, 'current, S, F>(
self,
scope: S
) -> JlrsResult<S::JuliaResult> where
S: Scope<'target, 'current, 'data, F>,
F: Frame<'current>,
unsafe fn call0<'target, 'current, S, F>(
self,
scope: S
) -> JlrsResult<S::JuliaResult> where
S: Scope<'target, 'current, 'data, F>,
F: Frame<'current>,
Call a function with no arguments and root the result in scope
. Read more
Call a function with one argument and root the result in scope
. Read more
Call a function with two arguments and root the result in scope
. Read more
Call a function with three arguments and root the result in scope
. Read more
Call a function with an arbitrary number arguments and root the result in scope
. Read more
unsafe fn call0_unrooted<'target>(
self,
global: Global<'target>
) -> JuliaResultRef<'target, 'data>
unsafe fn call0_unrooted<'target>(
self,
global: Global<'target>
) -> JuliaResultRef<'target, 'data>
Call a function with no arguments without rooting the result. Read more
unsafe fn call1_unrooted<'target>(
self,
global: Global<'target>,
arg0: Value<'_, 'data>
) -> JuliaResultRef<'target, 'data>
unsafe fn call1_unrooted<'target>(
self,
global: Global<'target>,
arg0: Value<'_, 'data>
) -> JuliaResultRef<'target, 'data>
Call a function with one argument without rooting the result. Read more
unsafe fn call2_unrooted<'target>(
self,
global: Global<'target>,
arg0: Value<'_, 'data>,
arg1: Value<'_, 'data>
) -> JuliaResultRef<'target, 'data>
unsafe fn call2_unrooted<'target>(
self,
global: Global<'target>,
arg0: Value<'_, 'data>,
arg1: Value<'_, 'data>
) -> JuliaResultRef<'target, 'data>
Call a function with two arguments without rooting the result. Read more
unsafe fn call3_unrooted<'target>(
self,
global: Global<'target>,
arg0: Value<'_, 'data>,
arg1: Value<'_, 'data>,
arg2: Value<'_, 'data>
) -> JuliaResultRef<'target, 'data>
unsafe fn call3_unrooted<'target>(
self,
global: Global<'target>,
arg0: Value<'_, 'data>,
arg1: Value<'_, 'data>,
arg2: Value<'_, 'data>
) -> JuliaResultRef<'target, 'data>
Call a function with three arguments without rooting the result. Read more
unsafe fn call_unrooted<'target, 'value, V>(
self,
global: Global<'target>,
args: V
) -> JuliaResultRef<'target, 'data> where
V: AsMut<[Value<'value, 'data>]>,
unsafe fn call_unrooted<'target, 'value, V>(
self,
global: Global<'target>,
args: V
) -> JuliaResultRef<'target, 'data> where
V: AsMut<[Value<'value, 'data>]>,
Call a function with an abitrary number of arguments without rooting the result. Read more
unsafe fn call_async<'frame, 'value, 'life0, 'async_trait, V>(
self,
frame: &'life0 mut AsyncGcFrame<'frame>,
args: V
) -> Pin<Box<dyn Future<Output = JlrsResult<JuliaResult<'frame, 'data>>> + 'async_trait>> where
V: AsMut<[Value<'value, 'data>]>,
'frame: 'async_trait,
'value: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
unsafe fn call_async<'frame, 'value, 'life0, 'async_trait, V>(
self,
frame: &'life0 mut AsyncGcFrame<'frame>,
args: V
) -> Pin<Box<dyn Future<Output = JlrsResult<JuliaResult<'frame, 'data>>> + 'async_trait>> where
V: AsMut<[Value<'value, 'data>]>,
'frame: 'async_trait,
'value: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Call a function on another thread with the given arguments. This method uses
Base.Threads.@spawn
to call the given function on another thread but return immediately.
While await
ing the result the async runtime can work on other tasks, the current task
resumes after the function call on the other thread completes. Read more
unsafe fn schedule_async<'frame, 'value, V>(
self,
frame: &mut AsyncGcFrame<'frame>,
args: V
) -> JlrsResult<JuliaResult<'frame, 'data, Task<'frame>>> where
V: AsMut<[Value<'value, 'data>]>,
unsafe fn schedule_async<'frame, 'value, V>(
self,
frame: &mut AsyncGcFrame<'frame>,
args: V
) -> JlrsResult<JuliaResult<'frame, 'data, Task<'frame>>> where
V: AsMut<[Value<'value, 'data>]>,
Does the same thing as CallAsync::call_async
, but the task is returned rather than an
awaitable Future
. This method should only be called in GeneratorTask::init
,
otherwise it’s not guaranteed this task can progress. Read more
unsafe fn call_async_local<'frame, 'value, 'life0, 'async_trait, V>(
self,
frame: &'life0 mut AsyncGcFrame<'frame>,
args: V
) -> Pin<Box<dyn Future<Output = JlrsResult<JuliaResult<'frame, 'data>>> + 'async_trait>> where
V: AsMut<[Value<'value, 'data>]>,
'frame: 'async_trait,
'value: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
unsafe fn call_async_local<'frame, 'value, 'life0, 'async_trait, V>(
self,
frame: &'life0 mut AsyncGcFrame<'frame>,
args: V
) -> Pin<Box<dyn Future<Output = JlrsResult<JuliaResult<'frame, 'data>>> + 'async_trait>> where
V: AsMut<[Value<'value, 'data>]>,
'frame: 'async_trait,
'value: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Call a function with the given arguments in an @async
block. Like call_async
, the
function is not called on the main thread, but on a separate thread that handles all
tasks created by this method. This method should only be used with functions that do very
little computational work but mostly spend their time waiting on IO. Read more
unsafe fn schedule_async_local<'frame, 'value, V>(
self,
frame: &mut AsyncGcFrame<'frame>,
args: V
) -> JlrsResult<JuliaResult<'frame, 'data, Task<'frame>>> where
V: AsMut<[Value<'value, 'data>]>,
unsafe fn schedule_async_local<'frame, 'value, V>(
self,
frame: &mut AsyncGcFrame<'frame>,
args: V
) -> JlrsResult<JuliaResult<'frame, 'data, Task<'frame>>> where
V: AsMut<[Value<'value, 'data>]>,
Does the same thing as CallAsync::call_async_local
, but the task is returned rather
than an awaitable Future
. This method should only be called in GeneratorTask::init
,
otherwise it’s not guaranteed this task can progress. Read more
Provide keyword arguments to the function. The keyword arguments must be a NamedTuple
. Read more
Check if the layout of the implementor is compatible with the layout of ty
. This
argument is a Value
to account for the fact that a field type can be a Union
,
UnionAll
or Union{}
. Read more
Auto Trait Implementations
impl<'scope, 'data> RefUnwindSafe for Function<'scope, 'data>
impl<'scope, 'data> UnwindSafe for Function<'scope, 'data>
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert the wrapper to its display string, i.e. the string that is shown when calling
Base.show
. Read more
Convert the wrapper to its error string, i.e. the string that is shown when calling
Base.showerror
. This string can contain ANSI color codes if this is enabled by calling
Julia::error_color
. Read more
Convert the wrapper to its display string, i.e. the string that is shown by calling
Base.display
, or some default value. Read more