rpc_adapter 0.1.12

English: RPC adapter for unified request handling / 中文: 统一请求处理的RPC适配器
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub struct Response {
  pub code: u16,
  pub body: bytes::Bytes,
}

impl std::error::Error for Response {}

impl std::fmt::Display for Response {
  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    write!(f, "err code {}", self.code)
  }
}

impl std::fmt::Debug for Response {
  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    std::fmt::Display::fmt(self, f)
  }
}