pub trait ResponseTrait {
// Required methods
fn set_request_id(&mut self, request_id: String);
fn result_code(&self) -> i32;
// Provided methods
fn response_type(&self) -> &'static str { ... }
fn error_code(&self) -> i32 { ... }
fn message(&self) -> String { ... }
fn is_success(&self) -> bool { ... }
}Expand description
Base trait for all response types
Required Methods§
Sourcefn set_request_id(&mut self, request_id: String)
fn set_request_id(&mut self, request_id: String)
Set request identifier for correlation
Sourcefn result_code(&self) -> i32
fn result_code(&self) -> i32
Get result code indicating operation status
Provided Methods§
Sourcefn response_type(&self) -> &'static str
fn response_type(&self) -> &'static str
Get response type identifier
Sourcefn error_code(&self) -> i32
fn error_code(&self) -> i32
Get error code (default: success)
Sourcefn is_success(&self) -> bool
fn is_success(&self) -> bool
Check if response indicates success