pub struct HyperHttpProtocol { /* private fields */ }Implementations§
Methods from Deref<Target = Meta<Request<Incoming>, Response<BoxBody<Bytes, Infallible>>>>§
pub fn req(&self) -> Result<&Req, DceErr>
pub fn req_mut(&mut self) -> &mut Option<Req>
pub fn resp_mut(&mut self) -> &mut Option<Response<Resp>>
pub fn heads(&self) -> &HashMap<String, String>
pub fn resp_heads(&self) -> &HashMap<String, String>
pub fn resp_heads_mut(&mut self) -> &mut HashMap<String, String>
Trait Implementations§
Source§impl Debug for HyperHttpProtocol
impl Debug for HyperHttpProtocol
Source§impl Deref for HyperHttpProtocol
impl Deref for HyperHttpProtocol
Source§impl DerefMut for HyperHttpProtocol
impl DerefMut for HyperHttpProtocol
Source§impl HttpMethodGetter for HyperHttpProtocol
impl HttpMethodGetter for HyperHttpProtocol
Source§impl HttpProtocol for HyperHttpProtocol
impl HttpProtocol for HyperHttpProtocol
Source§impl Into<Response<BoxBody<Bytes, Infallible>>> for HyperHttpProtocol
impl Into<Response<BoxBody<Bytes, Infallible>>> for HyperHttpProtocol
Source§impl RoutableProtocol for HyperHttpProtocol
impl RoutableProtocol for HyperHttpProtocol
type Req = Request<Incoming>
type Resp = Response<BoxBody<Bytes, Infallible>>
fn body<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = DceResult<Serialized>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pack_resp(&self, serialized: Serialized) -> Self::Resp
fn path(&self) -> &str
fn handle_result( self, result: DceResult<()>, _: &mut Context<Self>, ) -> Option<Self::Resp>
fn parse_api_method( prop_mapping: &mut HashMap<&'static str, Box<dyn Any + Send + Sync>>, ) -> Option<Box<dyn DceMethod<Self> + Send + Sync>>
fn id(&self) -> Option<&str>
fn handle<'async_trait>(
self,
router: Arc<Router<Self>>,
context_data: HashMap<String, Box<dyn Any + Send>>,
) -> Pin<Box<dyn Future<Output = Option<Self::Resp>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
fn api_match( &self, apis: &[&'static (dyn ApiTrait<Self> + Send + Sync)], ) -> Result<&'static (dyn ApiTrait<Self> + Send + Sync), DceErr>
fn deserializer<'a, ReqDto>( deserializers: &'a [Box<dyn Deserializer<ReqDto> + Send + Sync>], _context: &Context<Self>, ) -> Result<&'a Box<dyn Deserializer<ReqDto> + Send + Sync>, DceErr>
fn serializer<'a, RespDto>( serializers: &'a [Box<dyn Serializer<RespDto> + Send + Sync>], _context: &Context<Self>, ) -> Result<&'a Box<dyn Serializer<RespDto> + Send + Sync>, DceErr>
fn deserialize<ReqDto>( serializers: &[Box<dyn Deserializer<ReqDto> + Send + Sync>], seq: Serialized, context: &Context<Self>, ) -> Result<ReqDto, DceErr>
fn serialize<RespDto>( serializers: &[Box<dyn Serializer<RespDto> + Send + Sync>], dto: Serializable<RespDto>, context: &Context<Self>, ) -> Result<Serialized, DceErr>
fn pack_responsible<RespDto>(
context: &Context<Self>,
serializers: &[Box<dyn Serializer<RespDto> + Send + Sync>],
responsible: Serializable<RespDto>,
) -> Result<Option<Response<Self::Resp>>, DceErr>where
RespDto: 'static,
fn parse_api_method_and_extras( prop_tuples: Vec<(&'static str, Box<dyn Any + Send + Sync>)>, ) -> (Option<Box<dyn Method<Self> + Send + Sync>>, HashMap<&'static str, Box<dyn Any + Send + Sync>>)
fn try_print_err(response: &Result<(), DceErr>)
fn err_into(self, err: DceErr) -> Self::Resp
Auto Trait Implementations§
impl !Freeze for HyperHttpProtocol
impl !RefUnwindSafe for HyperHttpProtocol
impl Send for HyperHttpProtocol
impl Sync for HyperHttpProtocol
impl Unpin for HyperHttpProtocol
impl !UnwindSafe for HyperHttpProtocol
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