objc2_core_ml/generated/
MLUpdateContext.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// Provides context for the update process when the progress or completion handlers are invoked.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreml/mlupdatecontext?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct MLUpdateContext;
16);
17
18extern_conformance!(
19    unsafe impl NSObjectProtocol for MLUpdateContext {}
20);
21
22impl MLUpdateContext {
23    extern_methods!(
24        #[cfg(all(feature = "MLTask", feature = "MLUpdateTask"))]
25        #[unsafe(method(task))]
26        #[unsafe(method_family = none)]
27        pub unsafe fn task(&self) -> Retained<MLUpdateTask>;
28
29        #[cfg(all(feature = "MLModel", feature = "MLWritable"))]
30        #[unsafe(method(model))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn model(&self) -> Retained<MLModel>;
33
34        #[cfg(feature = "MLUpdateProgressEvent")]
35        #[unsafe(method(event))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn event(&self) -> MLUpdateProgressEvent;
38
39        #[cfg(all(feature = "MLKey", feature = "MLMetricKey"))]
40        #[unsafe(method(metrics))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn metrics(&self) -> Retained<NSDictionary<MLMetricKey, AnyObject>>;
43
44        #[cfg(all(feature = "MLKey", feature = "MLParameterKey"))]
45        #[unsafe(method(parameters))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn parameters(&self) -> Retained<NSDictionary<MLParameterKey, AnyObject>>;
48    );
49}
50
51/// Methods declared on superclass `NSObject`.
52impl MLUpdateContext {
53    extern_methods!(
54        #[unsafe(method(init))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
57
58        #[unsafe(method(new))]
59        #[unsafe(method_family = new)]
60        pub unsafe fn new() -> Retained<Self>;
61    );
62}