pub trait JSONResponseCode {
// Required method
fn get_code(&self) -> i32;
}
Expand description
The code of your JSON response.
Assume the code 0 means OK. You can define other codes by yourself.
This method will be called for one time when the response is being triggered. You can do something (perhaps keep a log?) at the moment.