pub unsafe fn enif_term_to_binary(
    env: *mut ErlNifEnv,
    term: ERL_NIF_TERM,
    bin: *mut ErlNifBinary
) -> c_int