Crate import_fn[][src]

Attribute Macros

import_fn

An attribute macro to convert Rust functions so they can be imported into a runtime. The meta attributes name and scope can be used to define the scoping of a particular when calling from javascript, for example scope = "Foo", name = "bar" would assign the function as Foo.bar. Without a scope the function will be attached to the global object, and without a name it will be assigned with the Rust function name.