Rustler return and pass reference from Rust to Elixir and back to Rust

Looks like we have to implement ResourceTypeProvider in order to implement Encoder.

EDIT: Decided to seek some help from the rust community, here.