[][src]Derive Macro rustler::NifMap

    // Attributes available to this derive:

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:

This example is not tested
struct AddMap {
    lhs: i32,
    rhs: i32,

Given the values 33 and 21 for this struct, this would result, when encoded, in an elixir map with two elements like:

%{lhs: 33, rhs: 21}