objc2_core_ml/generated/
MLImageConstraint.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 pub struct MLImageConstraint;
18);
19
20extern_conformance!(
21 unsafe impl NSCoding for MLImageConstraint {}
22);
23
24extern_conformance!(
25 unsafe impl NSObjectProtocol for MLImageConstraint {}
26);
27
28extern_conformance!(
29 unsafe impl NSSecureCoding for MLImageConstraint {}
30);
31
32impl MLImageConstraint {
33 extern_methods!(
34 #[unsafe(method(pixelsHigh))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn pixelsHigh(&self) -> NSInteger;
38
39 #[unsafe(method(pixelsWide))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn pixelsWide(&self) -> NSInteger;
43
44 #[unsafe(method(pixelFormatType))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn pixelFormatType(&self) -> OSType;
48
49 #[cfg(feature = "MLImageSizeConstraint")]
50 #[unsafe(method(sizeConstraint))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn sizeConstraint(&self) -> Retained<MLImageSizeConstraint>;
54
55 #[unsafe(method(init))]
56 #[unsafe(method_family = init)]
57 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58 );
59}
60
61impl MLImageConstraint {
63 extern_methods!(
64 #[unsafe(method(new))]
65 #[unsafe(method_family = new)]
66 pub unsafe fn new() -> Retained<Self>;
67 );
68}