objc2-core-ml 0.3.2

Bindings to the CoreML framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// A class to specify list of supported model update metrics.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreml/mlmetrickey?language=objc)
    #[unsafe(super(MLKey, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MLKey")]
    pub struct MLMetricKey;
);

#[cfg(feature = "MLKey")]
extern_conformance!(
    unsafe impl NSCoding for MLMetricKey {}
);

#[cfg(feature = "MLKey")]
extern_conformance!(
    unsafe impl NSCopying for MLMetricKey {}
);

#[cfg(feature = "MLKey")]
unsafe impl CopyingHelper for MLMetricKey {
    type Result = Self;
}

#[cfg(feature = "MLKey")]
extern_conformance!(
    unsafe impl NSObjectProtocol for MLMetricKey {}
);

#[cfg(feature = "MLKey")]
extern_conformance!(
    unsafe impl NSSecureCoding for MLMetricKey {}
);

#[cfg(feature = "MLKey")]
impl MLMetricKey {
    extern_methods!(
        #[unsafe(method(lossValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn lossValue() -> Retained<MLMetricKey>;

        #[unsafe(method(epochIndex))]
        #[unsafe(method_family = none)]
        pub unsafe fn epochIndex() -> Retained<MLMetricKey>;

        #[unsafe(method(miniBatchIndex))]
        #[unsafe(method_family = none)]
        pub unsafe fn miniBatchIndex() -> Retained<MLMetricKey>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}