Command

Trait Command 

Source
pub trait Command:
    Send
    + Sync
    + Debug {
    // Required methods
    fn execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        tr: &'life1 mut Transaction,
    ) -> Pin<Box<dyn Future<Output = TransformResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn name(&self) -> String;
}
Expand description

定义可执行的命令接口 要求实现 Send + Sync 以支持并发操作,并实现 Debug 以支持调试

Required Methods§

Source

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, tr: &'life1 mut Transaction, ) -> Pin<Box<dyn Future<Output = TransformResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn name(&self) -> String

Implementors§