pub struct OnnxConfig {
pub model_dir: PathBuf,
pub manifest: OcrArtifactManifest,
pub ort_runtime: Option<PathBuf>,
pub lease_hook: Option<Arc<dyn ModelLeaseHook>>,
}Expand description
Verified ONNX model set used by the fallback / Onnx preference.
Fields§
§model_dir: PathBuf§manifest: OcrArtifactManifest§ort_runtime: Option<PathBuf>Absolute ONNX Runtime library; None keeps whatever the caller already
configured through rightkit-onnx / ORT_DYLIB_PATH.
lease_hook: Option<Arc<dyn ModelLeaseHook>>Optional app model-store lease, held while the engine is loaded.
Implementations§
Source§impl OnnxConfig
impl OnnxConfig
pub fn new(model_dir: impl Into<PathBuf>, manifest: OcrArtifactManifest) -> Self
Sourcepub fn with_lease_hook(self, hook: Arc<dyn ModelLeaseHook>) -> Self
pub fn with_lease_hook(self, hook: Arc<dyn ModelLeaseHook>) -> Self
Register a model-store lease hook (see ModelLeaseHook).
Trait Implementations§
Source§impl Clone for OnnxConfig
impl Clone for OnnxConfig
Auto Trait Implementations§
impl !RefUnwindSafe for OnnxConfig
impl !UnwindSafe for OnnxConfig
impl Freeze for OnnxConfig
impl Send for OnnxConfig
impl Sync for OnnxConfig
impl Unpin for OnnxConfig
impl UnsafeUnpin for OnnxConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more