pub trait RuntimeFactory:
Send
+ Sync
+ 'static {
// Required methods
fn create(
&self,
intra_threads: usize,
) -> Result<Box<dyn Runtime>, RuntimeError>;
fn cpu_fallback(&self) -> Box<dyn RuntimeFactory>;
}Expand description
Creates a Runtime configured for a specific execution provider.
Required Methods§
fn create(&self, intra_threads: usize) -> Result<Box<dyn Runtime>, RuntimeError>
Sourcefn cpu_fallback(&self) -> Box<dyn RuntimeFactory>
fn cpu_fallback(&self) -> Box<dyn RuntimeFactory>
Returns a CPU-only factory suitable for small auxiliary models.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".