objc2-ml-compute 0.3.2

Bindings to the MLCompute 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 crate::*;

extern_class!(
    /// An arithmetic layer
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcarithmeticlayer?language=objc)
    #[unsafe(super(MLCLayer, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MLCLayer")]
    #[deprecated]
    pub struct MLCArithmeticLayer;
);

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

#[cfg(feature = "MLCLayer")]
impl MLCArithmeticLayer {
    extern_methods!(
        #[cfg(feature = "MLCTypes")]
        /// The arithmetic operation.
        #[deprecated]
        #[unsafe(method(operation))]
        #[unsafe(method_family = none)]
        pub unsafe fn operation(&self) -> MLCArithmeticOperation;

        #[cfg(feature = "MLCTypes")]
        /// Create an arithmetic layer
        ///
        /// Parameter `operation`: The arithmetic operation
        ///
        /// Returns: A new arithmetic layer
        #[deprecated]
        #[unsafe(method(layerWithOperation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn layerWithOperation(operation: MLCArithmeticOperation) -> Retained<Self>;
    );
}

/// Methods declared on superclass `MLCLayer`.
#[cfg(feature = "MLCLayer")]
impl MLCArithmeticLayer {
    extern_methods!(
        #[deprecated]
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

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