Trait ApiTrait

Source
pub trait ApiTrait<Rp: RoutableProtocol> {
    // Required methods
    fn method(&self) -> &Option<Box<dyn Method<Rp> + Send + Sync>>;
    fn path(&self) -> &'static str;
    fn suffixes(&self) -> &BTreeSet<Suffix>;
    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, rp: &Rp) -> bool;
    fn call_controller<'a, 'async_trait>(
        &'static self,
        context: &'a mut Context<Rp>,
    ) -> Pin<Box<dyn Future<Output = DceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait;
}

Required Methods§

Source

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

Source

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

Source

fn suffixes(&self) -> &BTreeSet<Suffix>

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, rp: &Rp) -> bool

Source

fn call_controller<'a, 'async_trait>( &'static self, context: &'a mut Context<Rp>, ) -> Pin<Box<dyn Future<Output = DceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait,

Trait Implementations§

Source§

impl<Rp: RoutableProtocol> Debug for dyn ApiTrait<Rp> + Send + Sync + 'static

Source§

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

Formats the value using the given formatter. Read more

Implementors§

Source§

impl<Rp, ReqDto, RespDto> ApiTrait<Rp> for Api<Rp, ReqDto, RespDto>
where Rp: RoutableProtocol + Send + Sync + Debug + 'static, ReqDto: 'static, RespDto: 'static,