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 objc2_foundation::*;

use crate::*;

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

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

#[cfg(feature = "MLCLayer")]
impl MLCReshapeLayer {
    extern_methods!(
        /// The target shape.
        #[unsafe(method(shape))]
        #[unsafe(method_family = none)]
        pub unsafe fn shape(&self) -> Retained<NSArray<NSNumber>>;

        /// Creates a reshape layer with the shape you specify.
        ///
        /// Parameter `shape`: An array that contains the sizes of each dimension.
        ///
        /// Returns: A new reshape layer.
        #[deprecated]
        #[unsafe(method(layerWithShape:))]
        #[unsafe(method_family = none)]
        pub unsafe fn layerWithShape(shape: &NSArray<NSNumber>) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `MLCLayer`.
#[cfg(feature = "MLCLayer")]
impl MLCReshapeLayer {
    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>;
    );
}