pub trait OnnxInterface {
type InferenceModel: InferenceModelInterface;
// Required methods
fn load(&self, path: impl AsRef<Path>) -> Result<Self::InferenceModel>;
fn load_buffer(&self, data: &[u8]) -> Result<Self::InferenceModel>;
}Required Associated Types§
Required Methods§
fn load(&self, path: impl AsRef<Path>) -> Result<Self::InferenceModel>
Sourcefn load_buffer(&self, data: &[u8]) -> Result<Self::InferenceModel>
fn load_buffer(&self, data: &[u8]) -> Result<Self::InferenceModel>
Load a ONNX model from a buffer into an InferenceModel.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.