napi-rs/crates
Ivan Enderlin 81b07ce5a6
feat(napi) implement Either3 to Either26.
This patch introduces a new macro: `either_n!` that generates the types
`Either{n}` where $3 \leq n \leq 26$. Manual implementations for
`Either3`, `Either4` and `Either5` are removed by this patch too.

The `either_n!` macro is quite classical. There is no particular
trick, except `count_idents!` which simply turns, e.g. `A, B, C` into
`3`. This macro is used by `either_n!` to implement the
`debug_assert!` inside `from_napi_value`.
2022-07-05 17:01:12 +08:00
..
backend feat(napi) implement Either3 to Either26. 2022-07-05 17:01:12 +08:00
build
macro
napi feat(napi) implement Either3 to Either26. 2022-07-05 17:01:12 +08:00
sys