pub trait JSONResponseCode {
fn get_code(&self) -> i32;
}
impl JSONResponseCode for i8 {
#[inline]
fn get_code(&self) -> i32 {
i32::from(*self)
}
}
impl JSONResponseCode for i16 {
#[inline]
fn get_code(&self) -> i32 {
i32::from(*self)
}
}
impl JSONResponseCode for i32 {
#[inline]
fn get_code(&self) -> i32 {
*self
}
}
impl JSONResponseCode for u8 {
#[inline]
fn get_code(&self) -> i32 {
i32::from(*self)
}
}
impl JSONResponseCode for u16 {
#[inline]
fn get_code(&self) -> i32 {
i32::from(*self)
}
}
impl JSONResponseCode for u32 {
#[inline]
fn get_code(&self) -> i32 {
*self as i32
}
}