#[repr(transparent)]
pub struct Function<'scope, 'data> { /* private fields */ }
Expand description

A Julia function.

Implementations

Returns the DataType of this function. In Julia, every function has its own DataType.

Use the Output to extend the lifetime of this data.

Trait Implementations

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

Call a function with no arguments without rooting the result. Read more

Call a function with one argument without rooting the result. Read more

Call a function with two arguments without rooting the result. Read more

Call a function with three arguments without rooting the result. Read more

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

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 awaiting 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

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 PersistentTask::init, otherwise it’s not guaranteed this task can make progress. Read more

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

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 PersistentTask::init, otherwise it’s not guaranteed this task can make progress. Read more

Call a function with the given arguments in an @async block. The task is scheduled on the main thread. This method should only be used with functions that must run on the main thread. The runtime is blocked while this task is active. Read more

Does the same thing as CallAsync::call_async_main, but the task is returned rather than an awaitable Future. This method should only be called in PersistentTask::init, otherwise it’s not guaranteed this task can make progress. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Provide keyword arguments to the function. The keyword arguments must be a NamedTuple. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Convert the wrapper to a Ref.

Convert the wrapper to a Value.

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, AsyncJulia::error_color, or AsyncJulia::try_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

Convert the wrapper to its error string, i.e. the string that is shown when this value is thrown as an exception, or some default value. Read more