Module rustler::resource [] [src]

A NIF resource allows you to safely store rust structs in a term, and therefore keep it across NIF calls. The struct will be automatically dropped when the BEAM GC decides that there are no more references to the resource.

Structs

ResourceCell

This is the struct that holds a reference to a resource. It increments the refcounter for the resource instance on creation, and decrements when dropped.

Enums

NIF_RESOURCE_FLAGS

See ErlNifResourceFlags in the Erlang docs.