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!(
    /// Provides context for the update process when the progress or completion handlers are invoked.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreml/mlupdatecontext?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct MLUpdateContext;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for MLUpdateContext {}
);

impl MLUpdateContext {
    extern_methods!(
        #[cfg(all(feature = "MLTask", feature = "MLUpdateTask"))]
        #[unsafe(method(task))]
        #[unsafe(method_family = none)]
        pub unsafe fn task(&self) -> Retained<MLUpdateTask>;

        #[cfg(all(feature = "MLModel", feature = "MLWritable"))]
        #[unsafe(method(model))]
        #[unsafe(method_family = none)]
        pub unsafe fn model(&self) -> Retained<MLModel>;

        #[cfg(feature = "MLUpdateProgressEvent")]
        #[unsafe(method(event))]
        #[unsafe(method_family = none)]
        pub unsafe fn event(&self) -> MLUpdateProgressEvent;

        #[cfg(all(feature = "MLKey", feature = "MLMetricKey"))]
        #[unsafe(method(metrics))]
        #[unsafe(method_family = none)]
        pub unsafe fn metrics(&self) -> Retained<NSDictionary<MLMetricKey, AnyObject>>;

        #[cfg(all(feature = "MLKey", feature = "MLParameterKey"))]
        #[unsafe(method(parameters))]
        #[unsafe(method_family = none)]
        pub unsafe fn parameters(&self) -> Retained<NSDictionary<MLParameterKey, AnyObject>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl MLUpdateContext {
    extern_methods!(
        #[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>;
    );
}