objc2_foundation/generated/
NSInflectionRule.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9 #[unsafe(super(NSObject))]
11 #[derive(Debug, PartialEq, Eq, Hash)]
12 pub struct NSInflectionRule;
13);
14
15#[cfg(feature = "NSObject")]
16unsafe impl NSCoding for NSInflectionRule {}
17
18#[cfg(feature = "NSObject")]
19unsafe impl NSCopying for NSInflectionRule {}
20
21#[cfg(feature = "NSObject")]
22unsafe impl CopyingHelper for NSInflectionRule {
23 type Result = Self;
24}
25
26unsafe impl NSObjectProtocol for NSInflectionRule {}
27
28#[cfg(feature = "NSObject")]
29unsafe impl NSSecureCoding for NSInflectionRule {}
30
31impl NSInflectionRule {
32 extern_methods!(
33 #[unsafe(method(init))]
34 #[unsafe(method_family = init)]
35 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
36
37 #[unsafe(method(automaticRule))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn automaticRule() -> Retained<NSInflectionRule>;
40 );
41}
42
43impl NSInflectionRule {
45 extern_methods!(
46 #[unsafe(method(new))]
47 #[unsafe(method_family = new)]
48 pub unsafe fn new() -> Retained<Self>;
49 );
50}
51
52extern_class!(
53 #[unsafe(super(NSInflectionRule, NSObject))]
55 #[derive(Debug, PartialEq, Eq, Hash)]
56 pub struct NSInflectionRuleExplicit;
57);
58
59#[cfg(feature = "NSObject")]
60unsafe impl NSCoding for NSInflectionRuleExplicit {}
61
62#[cfg(feature = "NSObject")]
63unsafe impl NSCopying for NSInflectionRuleExplicit {}
64
65#[cfg(feature = "NSObject")]
66unsafe impl CopyingHelper for NSInflectionRuleExplicit {
67 type Result = Self;
68}
69
70unsafe impl NSObjectProtocol for NSInflectionRuleExplicit {}
71
72#[cfg(feature = "NSObject")]
73unsafe impl NSSecureCoding for NSInflectionRuleExplicit {}
74
75impl NSInflectionRuleExplicit {
76 extern_methods!(
77 #[cfg(feature = "NSMorphology")]
78 #[unsafe(method(initWithMorphology:))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn initWithMorphology(
81 this: Allocated<Self>,
82 morphology: &NSMorphology,
83 ) -> Retained<Self>;
84
85 #[cfg(feature = "NSMorphology")]
86 #[unsafe(method(morphology))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn morphology(&self) -> Retained<NSMorphology>;
89 );
90}
91
92impl NSInflectionRuleExplicit {
94 extern_methods!(
95 #[unsafe(method(init))]
96 #[unsafe(method_family = init)]
97 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
98 );
99}
100
101impl NSInflectionRuleExplicit {
103 extern_methods!(
104 #[unsafe(method(new))]
105 #[unsafe(method_family = new)]
106 pub unsafe fn new() -> Retained<Self>;
107 );
108}
109
110impl NSInflectionRule {
112 extern_methods!(
113 #[cfg(feature = "NSString")]
114 #[unsafe(method(canInflectLanguage:))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn canInflectLanguage(language: &NSString) -> bool;
117
118 #[unsafe(method(canInflectPreferredLocalization))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn canInflectPreferredLocalization() -> bool;
121 );
122}