api

Function api 

Source
pub fn api() -> &'static OrtApi
Expand description

Returns a reference to the global ort_sys::OrtApi object.

ยงPanics

May panic if:

  • The alternative-backend feature is enabled and set_api was not yet called.
  • Getting the OrtApi struct fails, due to ort loading an unsupported version of ONNX Runtime.
  • Loading the ONNX Runtime dynamic library fails if the load-dynamic feature is enabled.