pub trait RawRequest {
    type Rpi: RoutableProtocol + Debug;
    type Req: 'static;
    type Resp: Debug + 'static;

Show 14 methods // Required methods fn new(proto: Self::Rpi) -> Self; fn path(&self) -> &str; fn raw(&self) -> &Self::Rpi; fn raw_mut(&mut self) -> &mut Self::Rpi; fn data<'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_response(self, serialized: Serialized) -> DceResult<Self::Resp> where Self: Sized; // Provided methods fn pack_responsible<RespDto: 'static>( self, serializers: &[Box<dyn Serializer<RespDto> + Send + Sync>], responsible: Serializable<RespDto> ) -> DceResult<Option<Self::Resp>> where Self: Sized { ... } fn api_match<Raw: RawRequest>( raw: &Raw, apis: &[&'static (dyn ApiTrait<Raw> + Send + Sync)] ) -> DceResult<&'static (dyn ApiTrait<Raw> + Send + Sync)> { ... } fn parse_api_method( _prop_mapping: &mut HashMap<&'static str, Box<dyn Any + Send + Sync>> ) -> Option<Box<dyn Method<Self::Rpi> + Send + Sync>> { ... } fn route<'async_trait>( context: RequestContext<Self> ) -> Pin<Box<dyn Future<Output = (Option<bool>, DceResult<Option<Self::Resp>>)> + Send + 'async_trait>> where Self: Debug + Sized + Send + 'async_trait { ... } fn get_input_serializer<ReqDto>( deserializers: &[Box<dyn Deserializer<ReqDto> + Send + Sync>] ) -> &Box<dyn Deserializer<ReqDto> + Send + Sync> { ... } fn get_output_serializer<RespDto>( serializers: &[Box<dyn Serializer<RespDto> + Send + Sync>] ) -> &Box<dyn Serializer<RespDto> + Send + Sync> { ... } fn deserialize<ReqDto>( serializers: &[Box<dyn Deserializer<ReqDto> + Send + Sync>], raw: Serialized ) -> DceResult<ReqDto> { ... } fn serialize<RespDto>( serializers: &[Box<dyn Serializer<RespDto> + Send + Sync>], dto: Serializable<RespDto> ) -> DceResult<Serialized> { ... }
}
Expand description

Package for raw request data and agent for protocol

Required Associated Types§

source

type Rpi: RoutableProtocol + Debug

source

type Req: 'static

source

type Resp: Debug + 'static

Required Methods§

source

fn new(proto: Self::Rpi) -> Self

source

fn path(&self) -> &str

source

fn raw(&self) -> &Self::Rpi

source

fn raw_mut(&mut self) -> &mut Self::Rpi

source

fn data<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = DceResult<Serialized>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn pack_response(self, serialized: Serialized) -> DceResult<Self::Resp>
where Self: Sized,

Provided Methods§

source

fn pack_responsible<RespDto: 'static>( self, serializers: &[Box<dyn Serializer<RespDto> + Send + Sync>], responsible: Serializable<RespDto> ) -> DceResult<Option<Self::Resp>>
where Self: Sized,

source

fn api_match<Raw: RawRequest>( raw: &Raw, apis: &[&'static (dyn ApiTrait<Raw> + Send + Sync)] ) -> DceResult<&'static (dyn ApiTrait<Raw> + Send + Sync)>

source

fn parse_api_method( _prop_mapping: &mut HashMap<&'static str, Box<dyn Any + Send + Sync>> ) -> Option<Box<dyn Method<Self::Rpi> + Send + Sync>>

source

fn route<'async_trait>( context: RequestContext<Self> ) -> Pin<Box<dyn Future<Output = (Option<bool>, DceResult<Option<Self::Resp>>)> + Send + 'async_trait>>
where Self: Debug + Sized + Send + 'async_trait,

source

fn get_input_serializer<ReqDto>( deserializers: &[Box<dyn Deserializer<ReqDto> + Send + Sync>] ) -> &Box<dyn Deserializer<ReqDto> + Send + Sync>

source

fn get_output_serializer<RespDto>( serializers: &[Box<dyn Serializer<RespDto> + Send + Sync>] ) -> &Box<dyn Serializer<RespDto> + Send + Sync>

source

fn deserialize<ReqDto>( serializers: &[Box<dyn Deserializer<ReqDto> + Send + Sync>], raw: Serialized ) -> DceResult<ReqDto>

source

fn serialize<RespDto>( serializers: &[Box<dyn Serializer<RespDto> + Send + Sync>], dto: Serializable<RespDto> ) -> DceResult<Serialized>

Object Safety§

This trait is not object safe.

Implementors§