As described in #9, we want to also have an interface in which the user of the Elixir obtains a reference to a Collator Rust resource and uses it in multiple calls. This PR implements the NIF API for that interface.
This NIF API has a create_collator/2 function that takes a locale and an options map and returns a reference that can be passed as the first argument to sort_using_collator/2. For example:
As described in #9, we want to also have an interface in which the user of the Elixir obtains a reference to a
Collator
Rust resource and uses it in multiple calls. This PR implements the NIF API for that interface.This NIF API has a
create_collator/2
function that takes a locale and an options map and returns a reference that can be passed as the first argument tosort_using_collator/2
. For example: