Currently a Khepri path is either a native path (a list of atoms, binaries and conditions) or a Unix-like path which is an Erlang string.
Several other Beam languages such as Elixir or Gleam implement strings as Erlang binaries. Therefore, it would be nice to extend Unix-like path to accept binaries as well. This should be even simpler to parse because we don't have to determine if the passed list is a native path or a Unix-like string!
The easy part is to update khepri_path:from_string/1 to accept and parse binaries. The boring part is to update all function specs... A new type should be introduced to include khepri_path:path(), string() and binary().
Currently a Khepri path is either a native path (a list of atoms, binaries and conditions) or a Unix-like path which is an Erlang string.
Several other Beam languages such as Elixir or Gleam implement strings as Erlang binaries. Therefore, it would be nice to extend Unix-like path to accept binaries as well. This should be even simpler to parse because we don't have to determine if the passed list is a native path or a Unix-like string!
The easy part is to update
khepri_path:from_string/1to accept and parse binaries. The boring part is to update all function specs... A new type should be introduced to includekhepri_path:path(),string()andbinary().