pub trait JSONResponseCode {
fn get_code(&self) -> i32;
}
impl JSONResponseCode for i8 {
fn get_code(&self) -> i32 {
*self as i32
}
}
impl JSONResponseCode for i16 {
fn get_code(&self) -> i32 {
*self as i32
}
}
impl JSONResponseCode for i32 {
fn get_code(&self) -> i32 {
*self
}
}
impl JSONResponseCode for u8 {
fn get_code(&self) -> i32 {
*self as i32
}
}
impl JSONResponseCode for u16 {
fn get_code(&self) -> i32 {
*self as i32
}
}