macro_rules! radixtree {
    ($($key:expr => $value:expr,)+) => { ... };
    ( $($key:expr => $value:expr),* ) => { ... };
    ($($key:expr,)+) => { ... };
    ( $($key:expr),* ) => { ... };
}
Expand description

A macro to generate a radix tree from key value pairs, similar to the maplit crate.

Elements must implement AsRef<[u8]>, so both &str and &[u8] work.

Map example:

let en_de = radixdb::radixtree! {
  "dog" => "Hund",
  "cat" => "Katze",
};

Set example:

let latin = radixdb::radixtree! {
  "romane",
  "romanus",
  "romulus",
  "rubens",
  "ruber",
  "rubicon",
  "rubicundus",
};