1 unstable release
0.1.2 | Jun 17, 2024 |
---|---|
0.1.1 |
|
#35 in #convenience
Used in structinator_traits
12KB
51 lines
structinator is a library for easy implementation of SpecifyCreatableStruct
from structinator_traits
. Just add the attribute #[iter_convertable]
to the struct you want to implement SpecifyCreatableStruct
, and an automatic implementation of the trait will allow conversion between iterators and the structure of your choice! For more information, check this library's documentation below.
lib.rs
:
The Struct-inator 3000!
A procedural macro library for allowing conversion from iterators to user-defined
struct
s.
This library does so by implementing a procedural macro, [macro@iter_convertable
] for struct
definitions that automatically implements structinator_traits::SpecifyCreatableStruct
for the defined struct
.
For more information about how [macro@iter_convertable
] implements SpecifyCreatableStruct
, visit the macro's documentation
For more information about how an implementation of SpecifyCreatableStruct
allows for easy conversion between Iterator
s and struct
s, visit the documentation of structinator_traits
Dependencies
~250–700KB
~17K SLoC