1 2 3 4 5 6 7 8 9 10 11 12 13 14
#[derive(Debug, Clone)] pub struct CliError { exit_code: i32, } impl CliError { pub fn new(exit_code: i32) -> Self { Self { exit_code } } pub fn exit_code(&self) -> i32 { self.exit_code } }