Struct rhai::FnPtr[][src]

pub struct FnPtr(_, _);
Expand description

A general function pointer, which may carry additional (i.e. curried) argument values to be passed onto a function during a call.

Implementations

Create a new function pointer.

Get the name of the function.

Get the curried arguments.

Add a new curried argument.

Set curried arguments to the function pointer.

Is the function pointer curried?

Get the number of curried arguments.

Does the function pointer refer to an anonymous function?

Not available under no_function.

Call the function pointer with curried arguments (if any).

If this function is a script-defined function, it must not be marked private.

WARNING

All the arguments are consumed, meaning that they’re replaced by (). This is to avoid unnecessarily cloning the arguments. Do not use the arguments after this call. If they are needed afterwards, clone them before calling this function.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. 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.

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.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. 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.