Trait dce_router::api::ApiTrait

source ·
pub trait ApiTrait<Raw: RawRequest> {
    // Required methods
    fn method(&self) -> &Option<Box<dyn Method<Raw::Rpi> + Send + Sync>>;
    fn path(&self) -> &'static str;
    fn id(&self) -> &'static str;
    fn omission(&self) -> bool;
    fn redirect(&self) -> &'static str;
    fn name(&self) -> &'static str;
    fn unresponsive(&self) -> bool;
    fn extras(&self) -> &HashMap<&'static str, Box<dyn Any + Send + Sync>>;
    fn method_match(&self, raw: &Raw) -> bool;
    fn call_controller<'async_trait>(
        &'static self,
        context: RequestContext<Raw>
    ) -> Pin<Box<dyn Future<Output = DceResult<Option<Raw::Resp>>> + Send + 'async_trait>>
       where Self: 'async_trait;
}

Required Methods§

source

fn method(&self) -> &Option<Box<dyn Method<Raw::Rpi> + Send + Sync>>

source

fn path(&self) -> &'static str

source

fn id(&self) -> &'static str

source

fn omission(&self) -> bool

source

fn redirect(&self) -> &'static str

source

fn name(&self) -> &'static str

source

fn unresponsive(&self) -> bool

source

fn extras(&self) -> &HashMap<&'static str, Box<dyn Any + Send + Sync>>

source

fn method_match(&self, raw: &Raw) -> bool

source

fn call_controller<'async_trait>( &'static self, context: RequestContext<Raw> ) -> Pin<Box<dyn Future<Output = DceResult<Option<Raw::Resp>>> + Send + 'async_trait>>
where Self: 'async_trait,

Trait Implementations§

source§

impl<Raw: RawRequest> Debug for dyn ApiTrait<Raw> + Send + Sync + 'static

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§

source§

impl<Raw, ReqDto, Req, Resp, RespDto> ApiTrait<Raw> for Api<Raw, ReqDto, Req, Resp, RespDto>
where Raw: RawRequest + Debug + Send + 'static, ReqDto: 'static, Req: From<ReqDto> + Debug + Send + Sync + 'static, Resp: Into<RespDto> + Send + Sync + 'static, RespDto: 'static,