pub struct CliProtocol { /* private fields */ }Implementations§
Source§impl CliProtocol
impl CliProtocol
pub fn script_path(&self) -> &str
pub fn forward_args(&self) -> &Vec<String>
pub fn args_map(&self) -> &HashMap<String, Vec<String>>
pub fn args(&self, key: &str) -> Vec<&str>
pub fn bool(&self, key: &str) -> bool
pub fn arg(&self, key: &str) -> Option<&str>
pub fn arg_or<'a>(&'a self, key: &str, def: &'a str) -> &'a str
pub fn new() -> Self
pub fn sync_handle(self, routed: DceResult<RouteMatch<'_, CliProtocol>>)
pub async fn handle(self, routed: DceResult<RouteMatch<'_, CliProtocol>>)
Methods from Deref<Target = RpMeta<()>>§
pub fn raw(&self) -> &Req
pub fn raw_mut(&mut self) -> &mut Req
pub fn clear_buffer(&mut self) -> Vec<u8> ⓘ
pub fn is_resp_empty(&self) -> bool
pub fn write(&mut self, bytes: Bytes)
pub fn write_string(&mut self, str: String)
pub fn set_ctx_data(&mut self, key: String, value: Box<dyn Any + Send>)
pub fn ctx_data(&self, key: &str) -> Option<&Box<dyn Any + Send>>
pub fn ctx_data_remove(&mut self, key: &str) -> Option<Box<dyn Any + Send>>
pub fn sid(&self) -> Option<&str>
pub fn set_session(&mut self)
pub fn session(&self)
pub fn set_resp_sid(&mut self, sid: String)
pub fn resp_sid(&self) -> Option<&str>
Trait Implementations§
Source§impl Deref for CliProtocol
impl Deref for CliProtocol
Source§impl DerefMut for CliProtocol
impl DerefMut for CliProtocol
Source§impl RoutableProtocol for CliProtocol
impl RoutableProtocol for CliProtocol
type Req = ()
fn path(&self) -> &str
fn sync_body(&mut self) -> DceResult<Bytes>
fn body<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = DceResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn id(&self) -> isize
fn sync_body_string(&mut self) -> Result<String, DceError>
fn body_string<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<String, DceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn match_api( &self, apis: &Vec<&'static Api<Self>>, ) -> Option<&'static Api<Self>>
fn try_print_err(&self, err: &Option<DceError>)
Auto Trait Implementations§
impl !RefUnwindSafe for CliProtocol
impl !Sync for CliProtocol
impl !UnwindSafe for CliProtocol
impl Freeze for CliProtocol
impl Send for CliProtocol
impl Unpin for CliProtocol
impl UnsafeUnpin 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