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:_))]
14 #[unsafe(method_family = init)]
15 unsafe fn initWithModelDescription_parameterDictionary_error(
16 this: Allocated<Self>,
17 model_description: &MLModelDescription,
18 parameters: &NSDictionary<NSString, AnyObject>,
19 ) -> Result<Retained<Self>, Retained<NSError>>;
20
21 #[cfg(all(feature = "MLFeatureProvider", feature = "MLPredictionOptions"))]
22 #[unsafe(method(predictionFromFeatures:options:error:_))]
23 #[unsafe(method_family = none)]
24 unsafe fn predictionFromFeatures_options_error(
25 &self,
26 input: &ProtocolObject<dyn MLFeatureProvider>,
27 options: &MLPredictionOptions,
28 ) -> Result<Retained<ProtocolObject<dyn MLFeatureProvider>>, Retained<NSError>>;
29
30 #[cfg(all(feature = "MLBatchProvider", feature = "MLPredictionOptions"))]
31 #[optional]
33 #[unsafe(method(predictionsFromBatch:options:error:_))]
34 #[unsafe(method_family = none)]
35 unsafe fn predictionsFromBatch_options_error(
36 &self,
37 input_batch: &ProtocolObject<dyn MLBatchProvider>,
38 options: &MLPredictionOptions,
39 ) -> Result<Retained<ProtocolObject<dyn MLBatchProvider>>, Retained<NSError>>;
40 }
41);