1 2 3 4 5 6 7 8 9 10 11 12 13 14
#![allow(dead_code)] #[derive(Debug, onlyerror::Error)] #[no_display] enum Error { /// First First, #[error("Second with {0}")] Second(usize), #[error("Third with {key} and {value:?}")] Third { key: String, value: Vec<usize> }, } fn main() {}