pub struct CliProtocol { /* private fields */ }Implementations§
Source§impl CliProtocol
impl CliProtocol
pub fn pass(&self) -> &Vec<String>
pub fn args(&self) -> &HashMap<String, String>
pub fn args_mut(&mut self) -> &mut HashMap<String, String>
pub async fn route( self, router: Arc<Router<Self>>, context_data: HashMap<String, Box<dyn Any + Send>>, )
pub fn new(base: usize) -> Self
Methods from Deref<Target = Meta<Vec<String>, String>>§
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 CliProtocol
impl Debug for CliProtocol
Source§impl Deref for CliProtocol
impl Deref for CliProtocol
Source§impl DerefMut for CliProtocol
impl DerefMut for CliProtocol
Source§impl Into<String> for CliProtocol
impl Into<String> for CliProtocol
Source§impl RoutableProtocol for CliProtocol
impl RoutableProtocol for CliProtocol
type Req = Vec<String>
type Resp = String
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 handle_result( self, result: DceResult<()>, context: &mut Context<Self>, ) -> Option<Self::Resp>
fn path(&self) -> &str
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 parse_api_method( _prop_mapping: &mut HashMap<&'static str, Box<dyn Any + Send + Sync>>, ) -> Option<Box<dyn Method<Self> + Send + Sync>>
fn try_print_err(response: &Result<(), DceErr>)
fn err_into(self, err: DceErr) -> Self::Resp
Auto Trait Implementations§
impl !Freeze for CliProtocol
impl RefUnwindSafe for CliProtocol
impl Send for CliProtocol
impl Sync for CliProtocol
impl Unpin for CliProtocol
impl UnwindSafe for CliProtocol
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