this post was submitted on 11 Jun 2026
33 points (97.1% liked)

Rust

8060 readers
18 users here now

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

Wormhole

!performance@programming.dev

Credits

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

founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] treadful@lemmy.zip 1 points 3 hours ago

I see you’re using strings. You can do that, but then you’ll lose control over formatting, and additional context info that might be contained in them.

I just haven't figured out how to jam multiple error types into one enum variant yet. There's no reason for the consumer of the module to get more pointless variants, so I'm not really sure I want an enum of enums, but maybe I'm overthinking it. I'll fiddle more and check out your link later today.