INNER CODE UNIT · Rust
profile
sonos/tract · api/ffi/src/lib.rs:709
let profile = (*model).0.profile_json(input)?;
*json = CString::new(profile)?.into_raw() as _;
Ok(())
})
}
/// Convert a TypedModel into a TypedRunnableModel.
///
/// This function transfers ownership of the `model` argument to the newly-created `runnable` model.
///
/// Runnable are reference counted. When done, it should be released with `tract_runnable_release`.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn tract_model_into_runnable(
model: *mut *mut TractModel,
runnable: *mut *mut TractRunnable,
) -> TRACT_RESULT {
wrap(|| unsafe {
check_not_null!(model, runnable);