objc2_core_ml/generated/
MLCustomModel.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_protocol!(
10 pub unsafe trait MLCustomModel {
12 #[cfg(feature = "MLModelDescription")]
13 #[unsafe(method(initWithModelDescription:parameterDictionary:error:_))]
17 #[unsafe(method_family = init)]
18 unsafe fn initWithModelDescription_parameterDictionary_error(
19 this: Allocated<Self>,
20 model_description: &MLModelDescription,
21 parameters: &NSDictionary<NSString, AnyObject>,
22 ) -> Result<Retained<Self>, Retained<NSError>>;
23
24 #[cfg(all(feature = "MLFeatureProvider", feature = "MLPredictionOptions"))]
25 #[unsafe(method(predictionFromFeatures:options:error:_))]
26 #[unsafe(method_family = none)]
27 unsafe fn predictionFromFeatures_options_error(
28 &self,
29 input: &ProtocolObject<dyn MLFeatureProvider>,
30 options: &MLPredictionOptions,
31 ) -> Result<Retained<ProtocolObject<dyn MLFeatureProvider>>, Retained<NSError>>;
32
33 #[cfg(all(feature = "MLBatchProvider", feature = "MLPredictionOptions"))]
34 #[optional]
36 #[unsafe(method(predictionsFromBatch:options:error:_))]
37 #[unsafe(method_family = none)]
38 unsafe fn predictionsFromBatch_options_error(
39 &self,
40 input_batch: &ProtocolObject<dyn MLBatchProvider>,
41 options: &MLPredictionOptions,
42 ) -> Result<Retained<ProtocolObject<dyn MLBatchProvider>>, Retained<NSError>>;
43 }
44);