I recently tried working with Teloxide and noticed that the library doesn’t have a convenient built-in way to serialize/deserialize callback data.
So I decided to try an approach based on binary serialization of an enum followed by base64 encoding. I liked this solution for several reasons:
There’s no need to manually implement serialization/deserialization for each callback variant-it’s enough to implement the conversion for the enum once.
It’s fast and reasonably efficient in terms of size.
The callback data becomes unreadable to humans (it would normally look something like do_something_1341), which provides a small barrier to reverse engineering.
I ended up packaging this approach into a Rust library called easy_callback.
I’d appreciate any feedback or suggestions.
1 post - 1 participant
Read full topic
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | Architecture review of a Hyper/Tower-based web framework (Toxi) | 0 | 15.46 | 06-10-2026 |
| 2 | Thisversion: Keep schema history out of your application model | 0 | 7.06 | 05-10-2026 |
| 3 | Any thin wrapper around the Web Worker API? | 0 | 6.59 | 07-10-2026 |
| 4 | Are there wait-free priority queue crates? | 0 | 16.09 | 05-10-2026 |
| 5 | What's everyone working on this week (41/2026)? | 0 | 20.34 | 06-10-2026 |
| 6 | Feedback wanted: compio-pool, a thread-per-core connection pool for !Send connections | 0 | 17.89 | 08-10-2026 |
| 7 | Strategies for dyn trait objects with optional behavior? | 0 | 7.12 | 06-10-2026 |
| 8 | Optimization of inlined functions returning Result? | 0 | 7.36 | 06-10-2026 |
| 9 | Why no Dependent Matrix Type? | 0 | 5.16 | 08-10-2026 |
| 10 | Announcing Topcoat: a framework for building full-stack reactive web apps with Rust | 0 | 18.33 | 22-07-2026 |