rpc_adapter 0.1.12

English: RPC adapter for unified request handling / 中文: 统一请求处理的RPC适配器
Documentation
#![cfg_attr(docsrs, feature(doc_cfg))]

mod call;
mod response;
mod r#return;

pub use call::{AsyncCall, Call};
pub use http::Extensions;
pub use response::Response;
pub use r#return::Return;

pub trait Map {
  fn get(&self, key: impl AsRef<str>) -> Option<&str>;
}

pub trait Req {
  fn headers(&self) -> impl Map;
  fn extensions(&self) -> &Extensions;
  fn extensions_mut(&mut self) -> &mut Extensions;
}

pub trait IntoResponse<T> {
  fn into_response(self) -> T;
}

#[cfg(feature = "volo")]
pub mod volo;