pub trait ModelInfo: Send + Sync {
// Required method
fn model_id(&self) -> &str;
// Provided method
fn active_execution_providers(&self) -> Vec<String> { ... }
}Expand description
Metadata common to every loaded model handle.
Supertrait of every task trait (EmbeddingModel, RerankerModel, …) so a
caller holding any typed handle can identify the model and inspect its
requested execution backends uniformly.
Required Methods§
Provided Methods§
Sourcefn active_execution_providers(&self) -> Vec<String>
fn active_execution_providers(&self) -> Vec<String>
Names of the ONNX Runtime execution providers this session was built with, in priority order. Empty for remote and non-ONNX models.
This is the requested list minus any entry whose backing feature
isn’t compiled into this binary — so a list that reads ["cpu"]
despite ["cuda", "cpu"] having been asked for tells you the build
lacks gpu-cuda.
It is still not “attached”: an EP listed here may yet fail to register at session-build time (no device, no driver) and be skipped by ORT. The ORT 2.0 Rust binding does not expose the finally-attached set.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".