this post was submitted on 28 Jan 2025
10 points (100.0% liked)

Rust

6433 readers
73 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
 

Inspired by Contex-Generic Programming, I made this macro, that allows you to write those generic implementations easily. This is kinda CGP, but simple and with better errors.

Ever repeat yourself implementing traits? Or wanted to easily swap out parts of your code, with (almost) no need to refactor? That is what this is for.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 month ago

For a deeper showcase (the complete cgp example adapted): https://github.com/Aras14HD/abstract_impl_showcase