Crate rustler_codegen
source · [−]Macros
Implementation of a Native Implemented Function (NIF) macro that lets the user annotate a function that will be wrapped in higer-level NIF implementation.
Attribute Macros
Implementation of a Native Implemented Function (NIF) macro that lets the user annotate a function that will be wrapped in higer-level NIF implementation.
Derive Macros
Implementation of the NifException
macro that lets the user annotate a struct that will
be translated directly from an Elixir exception to a Rust struct. For example, the following
struct, annotated as such:
Implementation of a macro that lets the user annotate a struct with NifMap
so that the
struct can be encoded or decoded from an Elixir map. For example, the following struct
annotated as such:
Implementation of the NifRecord
macro that lets the user annotate a struct that will
be translated directly from an Elixir struct to a Rust struct. For example, the following
struct, annotated as such:
Implementation of the NifStruct
macro that lets the user annotate a struct that will
be translated directly from an Elixir struct to a Rust struct. For example, the following
struct, annotated as such:
Implementation of a macro that lets the user annotate a struct with NifTuple
so that the
struct can be encoded or decoded from an Elixir tuple. For example, the following struct
annotated as such:
Implementation of the NifUnitEnum
macro that lets the user annotate an enum with a unit type
that will generate elixir atoms when encoded
Implementation of the NifUntaggedEnum
macro that lets the user annotate an enum that will
generate elixir values when decoded. This can be used for rust enums that contain data and
will generate a value based on the kind of data encoded. For example from the test code: