objc2_core_ml/generated/
MLMetricKey.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    /// A class to specify list of supported model update metrics.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreml/mlmetrickey?language=objc)
13    #[unsafe(super(MLKey, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "MLKey")]
16    pub struct MLMetricKey;
17);
18
19#[cfg(feature = "MLKey")]
20extern_conformance!(
21    unsafe impl NSCoding for MLMetricKey {}
22);
23
24#[cfg(feature = "MLKey")]
25extern_conformance!(
26    unsafe impl NSCopying for MLMetricKey {}
27);
28
29#[cfg(feature = "MLKey")]
30unsafe impl CopyingHelper for MLMetricKey {
31    type Result = Self;
32}
33
34#[cfg(feature = "MLKey")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for MLMetricKey {}
37);
38
39#[cfg(feature = "MLKey")]
40extern_conformance!(
41    unsafe impl NSSecureCoding for MLMetricKey {}
42);
43
44#[cfg(feature = "MLKey")]
45impl MLMetricKey {
46    extern_methods!(
47        #[unsafe(method(lossValue))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn lossValue() -> Retained<MLMetricKey>;
50
51        #[unsafe(method(epochIndex))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn epochIndex() -> Retained<MLMetricKey>;
54
55        #[unsafe(method(miniBatchIndex))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn miniBatchIndex() -> Retained<MLMetricKey>;
58
59        #[unsafe(method(init))]
60        #[unsafe(method_family = init)]
61        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
62
63        #[unsafe(method(new))]
64        #[unsafe(method_family = new)]
65        pub unsafe fn new() -> Retained<Self>;
66    );
67}