objc2-foundation 0.3.2

Bindings to the Foundation framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsnumberformatterbehavior?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSNumberFormatterBehavior(pub NSUInteger);
impl NSNumberFormatterBehavior {
    #[doc(alias = "NSNumberFormatterBehaviorDefault")]
    pub const BehaviorDefault: Self = Self(0);
    #[doc(alias = "NSNumberFormatterBehavior10_0")]
    pub const Behavior10_0: Self = Self(1000);
    #[doc(alias = "NSNumberFormatterBehavior10_4")]
    pub const Behavior10_4: Self = Self(1040);
}

unsafe impl Encode for NSNumberFormatterBehavior {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSNumberFormatterBehavior {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsnumberformatterstyle?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSNumberFormatterStyle(pub NSUInteger);
impl NSNumberFormatterStyle {
    #[doc(alias = "NSNumberFormatterNoStyle")]
    pub const NoStyle: Self = Self(0);
    #[doc(alias = "NSNumberFormatterDecimalStyle")]
    pub const DecimalStyle: Self = Self(1);
    #[doc(alias = "NSNumberFormatterCurrencyStyle")]
    pub const CurrencyStyle: Self = Self(2);
    #[doc(alias = "NSNumberFormatterPercentStyle")]
    pub const PercentStyle: Self = Self(3);
    #[doc(alias = "NSNumberFormatterScientificStyle")]
    pub const ScientificStyle: Self = Self(4);
    #[doc(alias = "NSNumberFormatterSpellOutStyle")]
    pub const SpellOutStyle: Self = Self(5);
    #[doc(alias = "NSNumberFormatterOrdinalStyle")]
    pub const OrdinalStyle: Self = Self(6);
    #[doc(alias = "NSNumberFormatterCurrencyISOCodeStyle")]
    pub const CurrencyISOCodeStyle: Self = Self(8);
    #[doc(alias = "NSNumberFormatterCurrencyPluralStyle")]
    pub const CurrencyPluralStyle: Self = Self(9);
    #[doc(alias = "NSNumberFormatterCurrencyAccountingStyle")]
    pub const CurrencyAccountingStyle: Self = Self(10);
}

unsafe impl Encode for NSNumberFormatterStyle {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSNumberFormatterStyle {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsnumberformatterpadposition?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSNumberFormatterPadPosition(pub NSUInteger);
impl NSNumberFormatterPadPosition {
    #[doc(alias = "NSNumberFormatterPadBeforePrefix")]
    pub const BeforePrefix: Self = Self(0);
    #[doc(alias = "NSNumberFormatterPadAfterPrefix")]
    pub const AfterPrefix: Self = Self(1);
    #[doc(alias = "NSNumberFormatterPadBeforeSuffix")]
    pub const BeforeSuffix: Self = Self(2);
    #[doc(alias = "NSNumberFormatterPadAfterSuffix")]
    pub const AfterSuffix: Self = Self(3);
}

unsafe impl Encode for NSNumberFormatterPadPosition {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSNumberFormatterPadPosition {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsnumberformatterroundingmode?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSNumberFormatterRoundingMode(pub NSUInteger);
impl NSNumberFormatterRoundingMode {
    #[doc(alias = "NSNumberFormatterRoundCeiling")]
    pub const RoundCeiling: Self = Self(0);
    #[doc(alias = "NSNumberFormatterRoundFloor")]
    pub const RoundFloor: Self = Self(1);
    #[doc(alias = "NSNumberFormatterRoundDown")]
    pub const RoundDown: Self = Self(2);
    #[doc(alias = "NSNumberFormatterRoundUp")]
    pub const RoundUp: Self = Self(3);
    #[doc(alias = "NSNumberFormatterRoundHalfEven")]
    pub const RoundHalfEven: Self = Self(4);
    #[doc(alias = "NSNumberFormatterRoundHalfDown")]
    pub const RoundHalfDown: Self = Self(5);
    #[doc(alias = "NSNumberFormatterRoundHalfUp")]
    pub const RoundHalfUp: Self = Self(6);
}

unsafe impl Encode for NSNumberFormatterRoundingMode {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSNumberFormatterRoundingMode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsnumberformatter?language=objc)
    #[unsafe(super(NSFormatter, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "NSFormatter")]
    pub struct NSNumberFormatter;
);

#[cfg(feature = "NSFormatter")]
unsafe impl Send for NSNumberFormatter {}

#[cfg(feature = "NSFormatter")]
unsafe impl Sync for NSNumberFormatter {}

#[cfg(all(feature = "NSFormatter", feature = "NSObject"))]
extern_conformance!(
    unsafe impl NSCoding for NSNumberFormatter {}
);

#[cfg(all(feature = "NSFormatter", feature = "NSObject"))]
extern_conformance!(
    unsafe impl NSCopying for NSNumberFormatter {}
);

#[cfg(all(feature = "NSFormatter", feature = "NSObject"))]
unsafe impl CopyingHelper for NSNumberFormatter {
    type Result = Self;
}

#[cfg(feature = "NSFormatter")]
extern_conformance!(
    unsafe impl NSObjectProtocol for NSNumberFormatter {}
);

#[cfg(feature = "NSFormatter")]
impl NSNumberFormatter {
    extern_methods!(
        #[unsafe(method(formattingContext))]
        #[unsafe(method_family = none)]
        pub fn formattingContext(&self) -> NSFormattingContext;

        /// Setter for [`formattingContext`][Self::formattingContext].
        #[unsafe(method(setFormattingContext:))]
        #[unsafe(method_family = none)]
        pub fn setFormattingContext(&self, formatting_context: NSFormattingContext);

        #[cfg(all(feature = "NSError", feature = "NSRange", feature = "NSString"))]
        /// # Safety
        ///
        /// - `obj` should be of the correct type.
        /// - `rangep` must be a valid pointer or null.
        #[unsafe(method(getObjectValue:forString:range:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn getObjectValue_forString_range_error(
            &self,
            obj: Option<&mut Option<Retained<AnyObject>>>,
            string: &NSString,
            rangep: *mut NSRange,
        ) -> Result<(), Retained<NSError>>;

        #[cfg(all(feature = "NSString", feature = "NSValue"))]
        #[unsafe(method(stringFromNumber:))]
        #[unsafe(method_family = none)]
        pub fn stringFromNumber(&self, number: &NSNumber) -> Option<Retained<NSString>>;

        #[cfg(all(feature = "NSString", feature = "NSValue"))]
        #[unsafe(method(numberFromString:))]
        #[unsafe(method_family = none)]
        pub fn numberFromString(&self, string: &NSString) -> Option<Retained<NSNumber>>;

        #[cfg(all(feature = "NSString", feature = "NSValue"))]
        #[unsafe(method(localizedStringFromNumber:numberStyle:))]
        #[unsafe(method_family = none)]
        pub fn localizedStringFromNumber_numberStyle(
            num: &NSNumber,
            nstyle: NSNumberFormatterStyle,
        ) -> Retained<NSString>;

        #[unsafe(method(defaultFormatterBehavior))]
        #[unsafe(method_family = none)]
        pub fn defaultFormatterBehavior() -> NSNumberFormatterBehavior;

        #[unsafe(method(setDefaultFormatterBehavior:))]
        #[unsafe(method_family = none)]
        pub fn setDefaultFormatterBehavior(behavior: NSNumberFormatterBehavior);

        #[unsafe(method(minimumGroupingDigits))]
        #[unsafe(method_family = none)]
        pub fn minimumGroupingDigits(&self) -> NSInteger;

        /// Setter for [`minimumGroupingDigits`][Self::minimumGroupingDigits].
        #[unsafe(method(setMinimumGroupingDigits:))]
        #[unsafe(method_family = none)]
        pub fn setMinimumGroupingDigits(&self, minimum_grouping_digits: NSInteger);

        #[unsafe(method(numberStyle))]
        #[unsafe(method_family = none)]
        pub fn numberStyle(&self) -> NSNumberFormatterStyle;

        /// Setter for [`numberStyle`][Self::numberStyle].
        #[unsafe(method(setNumberStyle:))]
        #[unsafe(method_family = none)]
        pub fn setNumberStyle(&self, number_style: NSNumberFormatterStyle);

        #[cfg(feature = "NSLocale")]
        #[unsafe(method(locale))]
        #[unsafe(method_family = none)]
        pub fn locale(&self) -> Retained<NSLocale>;

        #[cfg(feature = "NSLocale")]
        /// Setter for [`locale`][Self::locale].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setLocale:))]
        #[unsafe(method_family = none)]
        pub fn setLocale(&self, locale: Option<&NSLocale>);

        #[unsafe(method(generatesDecimalNumbers))]
        #[unsafe(method_family = none)]
        pub fn generatesDecimalNumbers(&self) -> bool;

        /// Setter for [`generatesDecimalNumbers`][Self::generatesDecimalNumbers].
        #[unsafe(method(setGeneratesDecimalNumbers:))]
        #[unsafe(method_family = none)]
        pub fn setGeneratesDecimalNumbers(&self, generates_decimal_numbers: bool);

        #[unsafe(method(formatterBehavior))]
        #[unsafe(method_family = none)]
        pub fn formatterBehavior(&self) -> NSNumberFormatterBehavior;

        /// Setter for [`formatterBehavior`][Self::formatterBehavior].
        #[unsafe(method(setFormatterBehavior:))]
        #[unsafe(method_family = none)]
        pub fn setFormatterBehavior(&self, formatter_behavior: NSNumberFormatterBehavior);

        #[cfg(feature = "NSString")]
        #[unsafe(method(negativeFormat))]
        #[unsafe(method_family = none)]
        pub fn negativeFormat(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`negativeFormat`][Self::negativeFormat].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setNegativeFormat:))]
        #[unsafe(method_family = none)]
        pub fn setNegativeFormat(&self, negative_format: Option<&NSString>);

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        #[unsafe(method(textAttributesForNegativeValues))]
        #[unsafe(method_family = none)]
        pub fn textAttributesForNegativeValues(
            &self,
        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        /// Setter for [`textAttributesForNegativeValues`][Self::textAttributesForNegativeValues].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `text_attributes_for_negative_values` generic should be of the correct type.
        #[unsafe(method(setTextAttributesForNegativeValues:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTextAttributesForNegativeValues(
            &self,
            text_attributes_for_negative_values: Option<&NSDictionary<NSString, AnyObject>>,
        );

        #[cfg(feature = "NSString")]
        #[unsafe(method(positiveFormat))]
        #[unsafe(method_family = none)]
        pub fn positiveFormat(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`positiveFormat`][Self::positiveFormat].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setPositiveFormat:))]
        #[unsafe(method_family = none)]
        pub fn setPositiveFormat(&self, positive_format: Option<&NSString>);

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        #[unsafe(method(textAttributesForPositiveValues))]
        #[unsafe(method_family = none)]
        pub fn textAttributesForPositiveValues(
            &self,
        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        /// Setter for [`textAttributesForPositiveValues`][Self::textAttributesForPositiveValues].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `text_attributes_for_positive_values` generic should be of the correct type.
        #[unsafe(method(setTextAttributesForPositiveValues:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTextAttributesForPositiveValues(
            &self,
            text_attributes_for_positive_values: Option<&NSDictionary<NSString, AnyObject>>,
        );

        #[unsafe(method(allowsFloats))]
        #[unsafe(method_family = none)]
        pub fn allowsFloats(&self) -> bool;

        /// Setter for [`allowsFloats`][Self::allowsFloats].
        #[unsafe(method(setAllowsFloats:))]
        #[unsafe(method_family = none)]
        pub fn setAllowsFloats(&self, allows_floats: bool);

        #[cfg(feature = "NSString")]
        #[unsafe(method(decimalSeparator))]
        #[unsafe(method_family = none)]
        pub fn decimalSeparator(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`decimalSeparator`][Self::decimalSeparator].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setDecimalSeparator:))]
        #[unsafe(method_family = none)]
        pub fn setDecimalSeparator(&self, decimal_separator: Option<&NSString>);

        #[unsafe(method(alwaysShowsDecimalSeparator))]
        #[unsafe(method_family = none)]
        pub fn alwaysShowsDecimalSeparator(&self) -> bool;

        /// Setter for [`alwaysShowsDecimalSeparator`][Self::alwaysShowsDecimalSeparator].
        #[unsafe(method(setAlwaysShowsDecimalSeparator:))]
        #[unsafe(method_family = none)]
        pub fn setAlwaysShowsDecimalSeparator(&self, always_shows_decimal_separator: bool);

        #[cfg(feature = "NSString")]
        #[unsafe(method(currencyDecimalSeparator))]
        #[unsafe(method_family = none)]
        pub fn currencyDecimalSeparator(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`currencyDecimalSeparator`][Self::currencyDecimalSeparator].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setCurrencyDecimalSeparator:))]
        #[unsafe(method_family = none)]
        pub fn setCurrencyDecimalSeparator(&self, currency_decimal_separator: Option<&NSString>);

        #[unsafe(method(usesGroupingSeparator))]
        #[unsafe(method_family = none)]
        pub fn usesGroupingSeparator(&self) -> bool;

        /// Setter for [`usesGroupingSeparator`][Self::usesGroupingSeparator].
        #[unsafe(method(setUsesGroupingSeparator:))]
        #[unsafe(method_family = none)]
        pub fn setUsesGroupingSeparator(&self, uses_grouping_separator: bool);

        #[cfg(feature = "NSString")]
        #[unsafe(method(groupingSeparator))]
        #[unsafe(method_family = none)]
        pub fn groupingSeparator(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`groupingSeparator`][Self::groupingSeparator].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setGroupingSeparator:))]
        #[unsafe(method_family = none)]
        pub fn setGroupingSeparator(&self, grouping_separator: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(zeroSymbol))]
        #[unsafe(method_family = none)]
        pub fn zeroSymbol(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        /// Setter for [`zeroSymbol`][Self::zeroSymbol].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setZeroSymbol:))]
        #[unsafe(method_family = none)]
        pub fn setZeroSymbol(&self, zero_symbol: Option<&NSString>);

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        #[unsafe(method(textAttributesForZero))]
        #[unsafe(method_family = none)]
        pub fn textAttributesForZero(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        /// Setter for [`textAttributesForZero`][Self::textAttributesForZero].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `text_attributes_for_zero` generic should be of the correct type.
        #[unsafe(method(setTextAttributesForZero:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTextAttributesForZero(
            &self,
            text_attributes_for_zero: Option<&NSDictionary<NSString, AnyObject>>,
        );

        #[cfg(feature = "NSString")]
        #[unsafe(method(nilSymbol))]
        #[unsafe(method_family = none)]
        pub fn nilSymbol(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`nilSymbol`][Self::nilSymbol].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setNilSymbol:))]
        #[unsafe(method_family = none)]
        pub fn setNilSymbol(&self, nil_symbol: &NSString);

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        #[unsafe(method(textAttributesForNil))]
        #[unsafe(method_family = none)]
        pub fn textAttributesForNil(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        /// Setter for [`textAttributesForNil`][Self::textAttributesForNil].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `text_attributes_for_nil` generic should be of the correct type.
        #[unsafe(method(setTextAttributesForNil:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTextAttributesForNil(
            &self,
            text_attributes_for_nil: Option<&NSDictionary<NSString, AnyObject>>,
        );

        #[cfg(feature = "NSString")]
        #[unsafe(method(notANumberSymbol))]
        #[unsafe(method_family = none)]
        pub fn notANumberSymbol(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`notANumberSymbol`][Self::notANumberSymbol].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setNotANumberSymbol:))]
        #[unsafe(method_family = none)]
        pub fn setNotANumberSymbol(&self, not_a_number_symbol: Option<&NSString>);

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        #[unsafe(method(textAttributesForNotANumber))]
        #[unsafe(method_family = none)]
        pub fn textAttributesForNotANumber(
            &self,
        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        /// Setter for [`textAttributesForNotANumber`][Self::textAttributesForNotANumber].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `text_attributes_for_not_a_number` generic should be of the correct type.
        #[unsafe(method(setTextAttributesForNotANumber:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTextAttributesForNotANumber(
            &self,
            text_attributes_for_not_a_number: Option<&NSDictionary<NSString, AnyObject>>,
        );

        #[cfg(feature = "NSString")]
        #[unsafe(method(positiveInfinitySymbol))]
        #[unsafe(method_family = none)]
        pub fn positiveInfinitySymbol(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`positiveInfinitySymbol`][Self::positiveInfinitySymbol].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setPositiveInfinitySymbol:))]
        #[unsafe(method_family = none)]
        pub fn setPositiveInfinitySymbol(&self, positive_infinity_symbol: &NSString);

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        #[unsafe(method(textAttributesForPositiveInfinity))]
        #[unsafe(method_family = none)]
        pub fn textAttributesForPositiveInfinity(
            &self,
        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        /// Setter for [`textAttributesForPositiveInfinity`][Self::textAttributesForPositiveInfinity].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `text_attributes_for_positive_infinity` generic should be of the correct type.
        #[unsafe(method(setTextAttributesForPositiveInfinity:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTextAttributesForPositiveInfinity(
            &self,
            text_attributes_for_positive_infinity: Option<&NSDictionary<NSString, AnyObject>>,
        );

        #[cfg(feature = "NSString")]
        #[unsafe(method(negativeInfinitySymbol))]
        #[unsafe(method_family = none)]
        pub fn negativeInfinitySymbol(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`negativeInfinitySymbol`][Self::negativeInfinitySymbol].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setNegativeInfinitySymbol:))]
        #[unsafe(method_family = none)]
        pub fn setNegativeInfinitySymbol(&self, negative_infinity_symbol: &NSString);

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        #[unsafe(method(textAttributesForNegativeInfinity))]
        #[unsafe(method_family = none)]
        pub fn textAttributesForNegativeInfinity(
            &self,
        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        /// Setter for [`textAttributesForNegativeInfinity`][Self::textAttributesForNegativeInfinity].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `text_attributes_for_negative_infinity` generic should be of the correct type.
        #[unsafe(method(setTextAttributesForNegativeInfinity:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTextAttributesForNegativeInfinity(
            &self,
            text_attributes_for_negative_infinity: Option<&NSDictionary<NSString, AnyObject>>,
        );

        #[cfg(feature = "NSString")]
        #[unsafe(method(positivePrefix))]
        #[unsafe(method_family = none)]
        pub fn positivePrefix(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`positivePrefix`][Self::positivePrefix].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setPositivePrefix:))]
        #[unsafe(method_family = none)]
        pub fn setPositivePrefix(&self, positive_prefix: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(positiveSuffix))]
        #[unsafe(method_family = none)]
        pub fn positiveSuffix(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`positiveSuffix`][Self::positiveSuffix].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setPositiveSuffix:))]
        #[unsafe(method_family = none)]
        pub fn setPositiveSuffix(&self, positive_suffix: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(negativePrefix))]
        #[unsafe(method_family = none)]
        pub fn negativePrefix(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`negativePrefix`][Self::negativePrefix].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setNegativePrefix:))]
        #[unsafe(method_family = none)]
        pub fn setNegativePrefix(&self, negative_prefix: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(negativeSuffix))]
        #[unsafe(method_family = none)]
        pub fn negativeSuffix(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`negativeSuffix`][Self::negativeSuffix].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setNegativeSuffix:))]
        #[unsafe(method_family = none)]
        pub fn setNegativeSuffix(&self, negative_suffix: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(currencyCode))]
        #[unsafe(method_family = none)]
        pub fn currencyCode(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`currencyCode`][Self::currencyCode].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setCurrencyCode:))]
        #[unsafe(method_family = none)]
        pub fn setCurrencyCode(&self, currency_code: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(currencySymbol))]
        #[unsafe(method_family = none)]
        pub fn currencySymbol(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`currencySymbol`][Self::currencySymbol].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setCurrencySymbol:))]
        #[unsafe(method_family = none)]
        pub fn setCurrencySymbol(&self, currency_symbol: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(internationalCurrencySymbol))]
        #[unsafe(method_family = none)]
        pub fn internationalCurrencySymbol(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`internationalCurrencySymbol`][Self::internationalCurrencySymbol].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setInternationalCurrencySymbol:))]
        #[unsafe(method_family = none)]
        pub fn setInternationalCurrencySymbol(
            &self,
            international_currency_symbol: Option<&NSString>,
        );

        #[cfg(feature = "NSString")]
        #[unsafe(method(percentSymbol))]
        #[unsafe(method_family = none)]
        pub fn percentSymbol(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`percentSymbol`][Self::percentSymbol].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setPercentSymbol:))]
        #[unsafe(method_family = none)]
        pub fn setPercentSymbol(&self, percent_symbol: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(perMillSymbol))]
        #[unsafe(method_family = none)]
        pub fn perMillSymbol(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`perMillSymbol`][Self::perMillSymbol].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setPerMillSymbol:))]
        #[unsafe(method_family = none)]
        pub fn setPerMillSymbol(&self, per_mill_symbol: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(minusSign))]
        #[unsafe(method_family = none)]
        pub fn minusSign(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`minusSign`][Self::minusSign].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setMinusSign:))]
        #[unsafe(method_family = none)]
        pub fn setMinusSign(&self, minus_sign: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(plusSign))]
        #[unsafe(method_family = none)]
        pub fn plusSign(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`plusSign`][Self::plusSign].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setPlusSign:))]
        #[unsafe(method_family = none)]
        pub fn setPlusSign(&self, plus_sign: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(exponentSymbol))]
        #[unsafe(method_family = none)]
        pub fn exponentSymbol(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`exponentSymbol`][Self::exponentSymbol].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setExponentSymbol:))]
        #[unsafe(method_family = none)]
        pub fn setExponentSymbol(&self, exponent_symbol: Option<&NSString>);

        #[unsafe(method(groupingSize))]
        #[unsafe(method_family = none)]
        pub fn groupingSize(&self) -> NSUInteger;

        /// Setter for [`groupingSize`][Self::groupingSize].
        #[unsafe(method(setGroupingSize:))]
        #[unsafe(method_family = none)]
        pub fn setGroupingSize(&self, grouping_size: NSUInteger);

        #[unsafe(method(secondaryGroupingSize))]
        #[unsafe(method_family = none)]
        pub fn secondaryGroupingSize(&self) -> NSUInteger;

        /// Setter for [`secondaryGroupingSize`][Self::secondaryGroupingSize].
        #[unsafe(method(setSecondaryGroupingSize:))]
        #[unsafe(method_family = none)]
        pub fn setSecondaryGroupingSize(&self, secondary_grouping_size: NSUInteger);

        #[cfg(feature = "NSValue")]
        #[unsafe(method(multiplier))]
        #[unsafe(method_family = none)]
        pub fn multiplier(&self) -> Option<Retained<NSNumber>>;

        #[cfg(feature = "NSValue")]
        /// Setter for [`multiplier`][Self::multiplier].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setMultiplier:))]
        #[unsafe(method_family = none)]
        pub fn setMultiplier(&self, multiplier: Option<&NSNumber>);

        #[unsafe(method(formatWidth))]
        #[unsafe(method_family = none)]
        pub fn formatWidth(&self) -> NSUInteger;

        /// Setter for [`formatWidth`][Self::formatWidth].
        #[unsafe(method(setFormatWidth:))]
        #[unsafe(method_family = none)]
        pub fn setFormatWidth(&self, format_width: NSUInteger);

        #[cfg(feature = "NSString")]
        #[unsafe(method(paddingCharacter))]
        #[unsafe(method_family = none)]
        pub fn paddingCharacter(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`paddingCharacter`][Self::paddingCharacter].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setPaddingCharacter:))]
        #[unsafe(method_family = none)]
        pub fn setPaddingCharacter(&self, padding_character: Option<&NSString>);

        #[unsafe(method(paddingPosition))]
        #[unsafe(method_family = none)]
        pub fn paddingPosition(&self) -> NSNumberFormatterPadPosition;

        /// Setter for [`paddingPosition`][Self::paddingPosition].
        #[unsafe(method(setPaddingPosition:))]
        #[unsafe(method_family = none)]
        pub fn setPaddingPosition(&self, padding_position: NSNumberFormatterPadPosition);

        #[unsafe(method(roundingMode))]
        #[unsafe(method_family = none)]
        pub fn roundingMode(&self) -> NSNumberFormatterRoundingMode;

        /// Setter for [`roundingMode`][Self::roundingMode].
        #[unsafe(method(setRoundingMode:))]
        #[unsafe(method_family = none)]
        pub fn setRoundingMode(&self, rounding_mode: NSNumberFormatterRoundingMode);

        #[cfg(feature = "NSValue")]
        #[unsafe(method(roundingIncrement))]
        #[unsafe(method_family = none)]
        pub fn roundingIncrement(&self) -> Retained<NSNumber>;

        #[cfg(feature = "NSValue")]
        /// Setter for [`roundingIncrement`][Self::roundingIncrement].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setRoundingIncrement:))]
        #[unsafe(method_family = none)]
        pub fn setRoundingIncrement(&self, rounding_increment: Option<&NSNumber>);

        #[unsafe(method(minimumIntegerDigits))]
        #[unsafe(method_family = none)]
        pub fn minimumIntegerDigits(&self) -> NSUInteger;

        /// Setter for [`minimumIntegerDigits`][Self::minimumIntegerDigits].
        #[unsafe(method(setMinimumIntegerDigits:))]
        #[unsafe(method_family = none)]
        pub fn setMinimumIntegerDigits(&self, minimum_integer_digits: NSUInteger);

        #[unsafe(method(maximumIntegerDigits))]
        #[unsafe(method_family = none)]
        pub fn maximumIntegerDigits(&self) -> NSUInteger;

        /// Setter for [`maximumIntegerDigits`][Self::maximumIntegerDigits].
        #[unsafe(method(setMaximumIntegerDigits:))]
        #[unsafe(method_family = none)]
        pub fn setMaximumIntegerDigits(&self, maximum_integer_digits: NSUInteger);

        #[unsafe(method(minimumFractionDigits))]
        #[unsafe(method_family = none)]
        pub fn minimumFractionDigits(&self) -> NSUInteger;

        /// Setter for [`minimumFractionDigits`][Self::minimumFractionDigits].
        #[unsafe(method(setMinimumFractionDigits:))]
        #[unsafe(method_family = none)]
        pub fn setMinimumFractionDigits(&self, minimum_fraction_digits: NSUInteger);

        #[unsafe(method(maximumFractionDigits))]
        #[unsafe(method_family = none)]
        pub fn maximumFractionDigits(&self) -> NSUInteger;

        /// Setter for [`maximumFractionDigits`][Self::maximumFractionDigits].
        #[unsafe(method(setMaximumFractionDigits:))]
        #[unsafe(method_family = none)]
        pub fn setMaximumFractionDigits(&self, maximum_fraction_digits: NSUInteger);

        #[cfg(feature = "NSValue")]
        #[unsafe(method(minimum))]
        #[unsafe(method_family = none)]
        pub fn minimum(&self) -> Option<Retained<NSNumber>>;

        #[cfg(feature = "NSValue")]
        /// Setter for [`minimum`][Self::minimum].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setMinimum:))]
        #[unsafe(method_family = none)]
        pub fn setMinimum(&self, minimum: Option<&NSNumber>);

        #[cfg(feature = "NSValue")]
        #[unsafe(method(maximum))]
        #[unsafe(method_family = none)]
        pub fn maximum(&self) -> Option<Retained<NSNumber>>;

        #[cfg(feature = "NSValue")]
        /// Setter for [`maximum`][Self::maximum].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setMaximum:))]
        #[unsafe(method_family = none)]
        pub fn setMaximum(&self, maximum: Option<&NSNumber>);

        #[cfg(feature = "NSString")]
        #[unsafe(method(currencyGroupingSeparator))]
        #[unsafe(method_family = none)]
        pub fn currencyGroupingSeparator(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`currencyGroupingSeparator`][Self::currencyGroupingSeparator].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setCurrencyGroupingSeparator:))]
        #[unsafe(method_family = none)]
        pub fn setCurrencyGroupingSeparator(&self, currency_grouping_separator: Option<&NSString>);

        #[unsafe(method(isLenient))]
        #[unsafe(method_family = none)]
        pub fn isLenient(&self) -> bool;

        /// Setter for [`isLenient`][Self::isLenient].
        #[unsafe(method(setLenient:))]
        #[unsafe(method_family = none)]
        pub fn setLenient(&self, lenient: bool);

        #[unsafe(method(usesSignificantDigits))]
        #[unsafe(method_family = none)]
        pub fn usesSignificantDigits(&self) -> bool;

        /// Setter for [`usesSignificantDigits`][Self::usesSignificantDigits].
        #[unsafe(method(setUsesSignificantDigits:))]
        #[unsafe(method_family = none)]
        pub fn setUsesSignificantDigits(&self, uses_significant_digits: bool);

        #[unsafe(method(minimumSignificantDigits))]
        #[unsafe(method_family = none)]
        pub fn minimumSignificantDigits(&self) -> NSUInteger;

        /// Setter for [`minimumSignificantDigits`][Self::minimumSignificantDigits].
        #[unsafe(method(setMinimumSignificantDigits:))]
        #[unsafe(method_family = none)]
        pub fn setMinimumSignificantDigits(&self, minimum_significant_digits: NSUInteger);

        #[unsafe(method(maximumSignificantDigits))]
        #[unsafe(method_family = none)]
        pub fn maximumSignificantDigits(&self) -> NSUInteger;

        /// Setter for [`maximumSignificantDigits`][Self::maximumSignificantDigits].
        #[unsafe(method(setMaximumSignificantDigits:))]
        #[unsafe(method_family = none)]
        pub fn setMaximumSignificantDigits(&self, maximum_significant_digits: NSUInteger);

        #[unsafe(method(isPartialStringValidationEnabled))]
        #[unsafe(method_family = none)]
        pub fn isPartialStringValidationEnabled(&self) -> bool;

        /// Setter for [`isPartialStringValidationEnabled`][Self::isPartialStringValidationEnabled].
        #[unsafe(method(setPartialStringValidationEnabled:))]
        #[unsafe(method_family = none)]
        pub fn setPartialStringValidationEnabled(&self, partial_string_validation_enabled: bool);
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "NSFormatter")]
impl NSNumberFormatter {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new() -> Retained<Self>;
    );
}

#[cfg(feature = "NSFormatter")]
impl DefaultRetained for NSNumberFormatter {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}

/// NSNumberFormatterCompatibility.
#[cfg(feature = "NSFormatter")]
impl NSNumberFormatter {
    extern_methods!(
        #[unsafe(method(hasThousandSeparators))]
        #[unsafe(method_family = none)]
        pub fn hasThousandSeparators(&self) -> bool;

        /// Setter for [`hasThousandSeparators`][Self::hasThousandSeparators].
        #[unsafe(method(setHasThousandSeparators:))]
        #[unsafe(method_family = none)]
        pub fn setHasThousandSeparators(&self, has_thousand_separators: bool);

        #[cfg(feature = "NSString")]
        #[unsafe(method(thousandSeparator))]
        #[unsafe(method_family = none)]
        pub fn thousandSeparator(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`thousandSeparator`][Self::thousandSeparator].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setThousandSeparator:))]
        #[unsafe(method_family = none)]
        pub fn setThousandSeparator(&self, thousand_separator: Option<&NSString>);

        #[unsafe(method(localizesFormat))]
        #[unsafe(method_family = none)]
        pub fn localizesFormat(&self) -> bool;

        /// Setter for [`localizesFormat`][Self::localizesFormat].
        #[unsafe(method(setLocalizesFormat:))]
        #[unsafe(method_family = none)]
        pub fn setLocalizesFormat(&self, localizes_format: bool);

        #[cfg(feature = "NSString")]
        #[unsafe(method(format))]
        #[unsafe(method_family = none)]
        pub fn format(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        /// Setter for [`format`][Self::format].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setFormat:))]
        #[unsafe(method_family = none)]
        pub fn setFormat(&self, format: &NSString);

        #[cfg(feature = "NSAttributedString")]
        #[unsafe(method(attributedStringForZero))]
        #[unsafe(method_family = none)]
        pub fn attributedStringForZero(&self) -> Retained<NSAttributedString>;

        #[cfg(feature = "NSAttributedString")]
        /// Setter for [`attributedStringForZero`][Self::attributedStringForZero].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setAttributedStringForZero:))]
        #[unsafe(method_family = none)]
        pub fn setAttributedStringForZero(&self, attributed_string_for_zero: &NSAttributedString);

        #[cfg(feature = "NSAttributedString")]
        #[unsafe(method(attributedStringForNil))]
        #[unsafe(method_family = none)]
        pub fn attributedStringForNil(&self) -> Retained<NSAttributedString>;

        #[cfg(feature = "NSAttributedString")]
        /// Setter for [`attributedStringForNil`][Self::attributedStringForNil].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setAttributedStringForNil:))]
        #[unsafe(method_family = none)]
        pub fn setAttributedStringForNil(&self, attributed_string_for_nil: &NSAttributedString);

        #[cfg(feature = "NSAttributedString")]
        #[unsafe(method(attributedStringForNotANumber))]
        #[unsafe(method_family = none)]
        pub fn attributedStringForNotANumber(&self) -> Retained<NSAttributedString>;

        #[cfg(feature = "NSAttributedString")]
        /// Setter for [`attributedStringForNotANumber`][Self::attributedStringForNotANumber].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setAttributedStringForNotANumber:))]
        #[unsafe(method_family = none)]
        pub fn setAttributedStringForNotANumber(
            &self,
            attributed_string_for_not_a_number: &NSAttributedString,
        );

        #[cfg(feature = "NSDecimalNumber")]
        #[unsafe(method(roundingBehavior))]
        #[unsafe(method_family = none)]
        pub fn roundingBehavior(&self) -> Retained<NSDecimalNumberHandler>;

        #[cfg(feature = "NSDecimalNumber")]
        /// Setter for [`roundingBehavior`][Self::roundingBehavior].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[unsafe(method(setRoundingBehavior:))]
        #[unsafe(method_family = none)]
        pub fn setRoundingBehavior(&self, rounding_behavior: &NSDecimalNumberHandler);
    );
}