ResponseTrait

Trait ResponseTrait 

Source
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§

Source

fn set_request_id(&mut self, request_id: String)

Set request identifier for correlation

Source

fn result_code(&self) -> i32

Get result code indicating operation status

Provided Methods§

Source

fn response_type(&self) -> &'static str

Get response type identifier

Source

fn error_code(&self) -> i32

Get error code (default: success)

Source

fn message(&self) -> String

Get response message

Source

fn is_success(&self) -> bool

Check if response indicates success

Implementors§