cidre/ml/
model_model_compilation.rs1use crate::{arc, ml, ns, objc};
2
3impl ml::Model {
4 #[cfg(not(target_os = "watchos"))]
5 #[objc::msg_send(compileModelAtURL:error:)]
6 pub unsafe fn compile_model_at_url_err<'ear>(
7 model_url: &ns::Url,
8 err: *mut Option<&'ear ns::Error>,
9 ) -> Option<arc::R<ns::Url>>;
10
11 #[cfg(not(target_os = "watchos"))]
12 #[objc::available(macos = 10.13, ios = 11.0, tvos = 11.0)]
13 pub fn compile_model_at_url<'ear>(model_url: &ns::Url) -> ns::Result<'ear, arc::R<ns::Url>> {
14 ns::if_none(|err| unsafe { Self::compile_model_at_url_err(model_url, err) })
15 }
16}