1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#[derive(Clone, Eq, PartialEq, Debug)]
pub struct ActionError {
    code: u32,
    text: String,
}

impl ActionError {
    pub fn new(code: u32, text: String) -> ActionError {
        ActionError { code, text }
    }

    pub fn code(&self) -> u32 {
        self.code
    }

    pub fn text(&self) -> String {
        self.text.clone()
    }
}