pub trait ModelExecutorFactory: Send + Sync {
// Required methods
fn create_executor<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 ExecutorConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ModelExecutor>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn create_batch_executor<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 ExecutorConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn BatchModelExecutor>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn supported_types(&self) -> Vec<ExecutorType>;
fn validate_config(&self, config: &ExecutorConfig) -> Result<()>;
}Expand description
Model executor factory
Required Methods§
Sourcefn create_executor<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 ExecutorConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ModelExecutor>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_executor<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 ExecutorConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ModelExecutor>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create executor from model configuration
Sourcefn create_batch_executor<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 ExecutorConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn BatchModelExecutor>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_batch_executor<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 ExecutorConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn BatchModelExecutor>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create batch executor
Sourcefn supported_types(&self) -> Vec<ExecutorType>
fn supported_types(&self) -> Vec<ExecutorType>
Get supported executor types
Sourcefn validate_config(&self, config: &ExecutorConfig) -> Result<()>
fn validate_config(&self, config: &ExecutorConfig) -> Result<()>
Validate configuration