objc2_foundation/generated/
NSInflectionRule.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::*;
5
6use crate::*;
7
8extern_class!(
9    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsinflectionrule?language=objc)
10    #[unsafe(super(NSObject))]
11    #[derive(Debug, PartialEq, Eq, Hash)]
12    pub struct NSInflectionRule;
13);
14
15#[cfg(feature = "NSObject")]
16extern_conformance!(
17    unsafe impl NSCoding for NSInflectionRule {}
18);
19
20#[cfg(feature = "NSObject")]
21extern_conformance!(
22    unsafe impl NSCopying for NSInflectionRule {}
23);
24
25#[cfg(feature = "NSObject")]
26unsafe impl CopyingHelper for NSInflectionRule {
27    type Result = Self;
28}
29
30extern_conformance!(
31    unsafe impl NSObjectProtocol for NSInflectionRule {}
32);
33
34#[cfg(feature = "NSObject")]
35extern_conformance!(
36    unsafe impl NSSecureCoding for NSInflectionRule {}
37);
38
39impl NSInflectionRule {
40    extern_methods!(
41        #[unsafe(method(init))]
42        #[unsafe(method_family = init)]
43        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
44
45        #[unsafe(method(automaticRule))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn automaticRule() -> Retained<NSInflectionRule>;
48    );
49}
50
51/// Methods declared on superclass `NSObject`.
52impl NSInflectionRule {
53    extern_methods!(
54        #[unsafe(method(new))]
55        #[unsafe(method_family = new)]
56        pub unsafe fn new() -> Retained<Self>;
57    );
58}
59
60extern_class!(
61    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsinflectionruleexplicit?language=objc)
62    #[unsafe(super(NSInflectionRule, NSObject))]
63    #[derive(Debug, PartialEq, Eq, Hash)]
64    pub struct NSInflectionRuleExplicit;
65);
66
67#[cfg(feature = "NSObject")]
68extern_conformance!(
69    unsafe impl NSCoding for NSInflectionRuleExplicit {}
70);
71
72#[cfg(feature = "NSObject")]
73extern_conformance!(
74    unsafe impl NSCopying for NSInflectionRuleExplicit {}
75);
76
77#[cfg(feature = "NSObject")]
78unsafe impl CopyingHelper for NSInflectionRuleExplicit {
79    type Result = Self;
80}
81
82extern_conformance!(
83    unsafe impl NSObjectProtocol for NSInflectionRuleExplicit {}
84);
85
86#[cfg(feature = "NSObject")]
87extern_conformance!(
88    unsafe impl NSSecureCoding for NSInflectionRuleExplicit {}
89);
90
91impl NSInflectionRuleExplicit {
92    extern_methods!(
93        #[cfg(feature = "NSMorphology")]
94        #[unsafe(method(initWithMorphology:))]
95        #[unsafe(method_family = init)]
96        pub unsafe fn initWithMorphology(
97            this: Allocated<Self>,
98            morphology: &NSMorphology,
99        ) -> Retained<Self>;
100
101        #[cfg(feature = "NSMorphology")]
102        #[unsafe(method(morphology))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn morphology(&self) -> Retained<NSMorphology>;
105    );
106}
107
108/// Methods declared on superclass `NSInflectionRule`.
109impl NSInflectionRuleExplicit {
110    extern_methods!(
111        #[unsafe(method(init))]
112        #[unsafe(method_family = init)]
113        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
114    );
115}
116
117/// Methods declared on superclass `NSObject`.
118impl NSInflectionRuleExplicit {
119    extern_methods!(
120        #[unsafe(method(new))]
121        #[unsafe(method_family = new)]
122        pub unsafe fn new() -> Retained<Self>;
123    );
124}
125
126/// NSInflectionAvailability.
127impl NSInflectionRule {
128    extern_methods!(
129        #[cfg(feature = "NSString")]
130        #[unsafe(method(canInflectLanguage:))]
131        #[unsafe(method_family = none)]
132        pub unsafe fn canInflectLanguage(language: &NSString) -> bool;
133
134        #[unsafe(method(canInflectPreferredLocalization))]
135        #[unsafe(method_family = none)]
136        pub unsafe fn canInflectPreferredLocalization() -> bool;
137    );
138}