pub struct Response {
pub error_no: ErrNo,
pub error_message: String,
pub result: Bytes,
pub headers: HashMap<String, String>,
}
Expand description
http请求返回类型,无论成功还是失败都返回该类型,根据error_no
可区分是否成功
Fields§
§error_no: ErrNo
错误码
error_message: String
错误信息
result: Bytes
接口返回信息,当接口返回错误时也可能有值
headers: HashMap<String, String>
接口返回的headers, 有些接口需要拿到头部信息进行校验
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more