#gat #lending-iterator

no-std gat-std

Variants of Rust std traits that use GATs

2 releases

0.1.1 Jan 4, 2023
0.1.0 Jan 4, 2023

#199 in No standard library

Download history 86/week @ 2023-06-05 91/week @ 2023-06-12 120/week @ 2023-06-19 82/week @ 2023-06-26 88/week @ 2023-07-03 88/week @ 2023-07-10 86/week @ 2023-07-17 85/week @ 2023-07-24 77/week @ 2023-07-31 80/week @ 2023-08-07 91/week @ 2023-08-14 71/week @ 2023-08-21 57/week @ 2023-08-28 65/week @ 2023-09-04 65/week @ 2023-09-11 60/week @ 2023-09-18

252 downloads per month
Used in pcap

MIT/Apache

25KB
692 lines

GAT std

A variant of Rust std traits that use GATs, as well as a macro to allow rewriting code to use these traits instead of the std equivalents.

Why?

  1. These traits provide a common base so crates can all use the same definitions, like with num-traits
  2. std likely won't be able to change to use these traits for quite a while, if ever. This allows users to take advantage of GATs in their code smoothly despite that.

lib.rs:

GAT implementations of std traits

Traits are in the same respective paths as their std variants. The gatify macro changes operators to desugar to the traits in this crate instead of their std equivalents.

Dependencies

~1MB
~31K SLoC