User/Application errors vibes check
⚓ Rust 📅 2026-06-20 👤 surdeus 👁️ 2If you need to use a library crate that has a custom runtime with application callbacks (either via traits or closures), do you prefer it allows application-specific errors using generics or via Box<dyn Error + Send + Sync + 'static>?
I've mostly been using generics:
struct Error<E> {
IO(std::io::Error),
/// Application-defined error
App(E)
}
Recently I've been reevaluating this for various reasons, but I'm curious what the general vibe in the community is.
2 posts - 2 participants
🏷️ Rust_feed