pub trait ApiResponseTrait:
for<'a> Deserialize<'a>
+ Send
+ Sync
+ 'static
+ Debug {
// Required method
fn data_format() -> ResponseFormat;
// Provided method
fn from_binary(_file_name: String, _body: Vec<u8>) -> Option<Self> { ... }
}Expand description
业务返回值格式
Required Methods§
Sourcefn data_format() -> ResponseFormat
fn data_format() -> ResponseFormat
是否是标准数据格式, 既是用data包裹数据
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.