INNER CODE UNIT · Rust
nnef
sonos/tract · api/proxy/src/lib.rs:55
pub fn nnef() -> Result<Nnef> {
let mut nnef = null_mut();
check!(sys::tract_nnef_create(&mut nnef))?;
Ok(Nnef(nnef))
}
pub fn onnx() -> Result<Onnx> {
let mut onnx = null_mut();
check!(sys::tract_onnx_create(&mut onnx))?;
Ok(Onnx(onnx))
}
pub fn version() -> &'static str {
unsafe { CStr::from_ptr(sys::tract_version()).to_str().unwrap() }
}
wrapper!(Nnef, TractNnef, tract_nnef_destroy);
impl NnefInterface for Nnef {