Skip to main content

BackendFactory

Type Alias BackendFactory 

Source
pub type BackendFactory = fn() -> Box<dyn Backend>;
Expand description

Factory closure that constructs a fresh backend instance.

Called once per Session::compile. Implementations are typically stateless (e.g. unit struct CpuBackend); the per-graph state lives inside the returned Box<dyn Backend>.