objc2_core_ml/generated/
MLImageSizeConstraint.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    /// [Apple's documentation](https://developer.apple.com/documentation/coreml/mlimagesizeconstraint?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct MLImageSizeConstraint;
14);
15
16extern_conformance!(
17    unsafe impl NSCoding for MLImageSizeConstraint {}
18);
19
20extern_conformance!(
21    unsafe impl NSObjectProtocol for MLImageSizeConstraint {}
22);
23
24extern_conformance!(
25    unsafe impl NSSecureCoding for MLImageSizeConstraint {}
26);
27
28impl MLImageSizeConstraint {
29    extern_methods!(
30        #[cfg(feature = "MLImageSizeConstraintType")]
31        #[unsafe(method(type))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn r#type(&self) -> MLImageSizeConstraintType;
34
35        #[unsafe(method(pixelsWideRange))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn pixelsWideRange(&self) -> NSRange;
38
39        #[unsafe(method(pixelsHighRange))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn pixelsHighRange(&self) -> NSRange;
42
43        #[cfg(feature = "MLImageSize")]
44        #[unsafe(method(enumeratedImageSizes))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn enumeratedImageSizes(&self) -> Retained<NSArray<MLImageSize>>;
47    );
48}
49
50/// Methods declared on superclass `NSObject`.
51impl MLImageSizeConstraint {
52    extern_methods!(
53        #[unsafe(method(init))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
56
57        #[unsafe(method(new))]
58        #[unsafe(method_family = new)]
59        pub unsafe fn new() -> Retained<Self>;
60    );
61}