Skip to main content

CustomConditionGenerator

Trait CustomConditionGenerator 

Source
pub trait CustomConditionGenerator: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn generate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 DataScopeContext,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<WhereCondition>, DataScopeError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

自定义条件生成器 trait

Required Methods§

Source

fn name(&self) -> &str

生成器名称

Source

fn generate<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 DataScopeContext, ) -> Pin<Box<dyn Future<Output = Result<Vec<WhereCondition>, DataScopeError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

生成 WHERE 条件列表

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§