pub trait ForeignFunction<V> {
    fn parameter_count() -> Option<u16>;
    fn into_raw_foreign_function(self) -> RawForeignFunction;
}
Expand description

A Rust function that can be called from Mica.

To spare you the time needed to decipher the absolutely unreadable macro-generated implementations of this trait, functions with the following signatures are supported:

The generic parameter V is not used inside the trait. Its only purpose is to allow for multiple overlapping implementations of a trait for the same type. See ffvariants for more information.

Required Methods

Returns the number of parameters this function has, or None if the function accepts a variable number of arguments.

The default implementation returns None.

Converts the function to a RawForeignFunction.

Implementors

Implementation for a variable number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a variable number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.

Implementation for a static number of arguments.