Skip to main content

OnnxInterface

Trait OnnxInterface 

Source
pub trait OnnxInterface: Debug {
    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§

Source

fn load(&self, path: impl AsRef<Path>) -> Result<Self::InferenceModel>

Source

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".

Implementors§