objc2_ml_compute/generated/
MLCReshapeLayer.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 reshape layer.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcreshapelayer?language=objc)
13    #[unsafe(super(MLCLayer, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "MLCLayer")]
16    #[deprecated]
17    pub struct MLCReshapeLayer;
18);
19
20#[cfg(feature = "MLCLayer")]
21extern_conformance!(
22    unsafe impl NSObjectProtocol for MLCReshapeLayer {}
23);
24
25#[cfg(feature = "MLCLayer")]
26impl MLCReshapeLayer {
27    extern_methods!(
28        /// The target shape.
29        #[unsafe(method(shape))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn shape(&self) -> Retained<NSArray<NSNumber>>;
32
33        /// Creates a reshape layer with the shape you specify.
34        ///
35        /// Parameter `shape`: An array that contains the sizes of each dimension.
36        ///
37        /// Returns: A new reshape layer.
38        #[deprecated]
39        #[unsafe(method(layerWithShape:))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn layerWithShape(shape: &NSArray<NSNumber>) -> Option<Retained<Self>>;
42    );
43}
44
45/// Methods declared on superclass `MLCLayer`.
46#[cfg(feature = "MLCLayer")]
47impl MLCReshapeLayer {
48    extern_methods!(
49        #[deprecated]
50        #[unsafe(method(new))]
51        #[unsafe(method_family = new)]
52        pub unsafe fn new() -> Retained<Self>;
53
54        #[deprecated]
55        #[unsafe(method(init))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58    );
59}