1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct NSUnitConverter;
14);
15
16unsafe impl NSObjectProtocol for NSUnitConverter {}
17
18impl NSUnitConverter {
19 extern_methods!(
20 #[unsafe(method(baseUnitValueFromValue:))]
21 #[unsafe(method_family = none)]
22 pub unsafe fn baseUnitValueFromValue(&self, value: c_double) -> c_double;
23
24 #[unsafe(method(valueFromBaseUnitValue:))]
25 #[unsafe(method_family = none)]
26 pub unsafe fn valueFromBaseUnitValue(&self, base_unit_value: c_double) -> c_double;
27 );
28}
29
30impl NSUnitConverter {
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(new))]
38 #[unsafe(method_family = new)]
39 pub unsafe fn new() -> Retained<Self>;
40 );
41}
42
43extern_class!(
44 #[unsafe(super(NSUnitConverter, NSObject))]
46 #[derive(Debug, PartialEq, Eq, Hash)]
47 pub struct NSUnitConverterLinear;
48);
49
50#[cfg(feature = "NSObject")]
51unsafe impl NSCoding for NSUnitConverterLinear {}
52
53unsafe impl NSObjectProtocol for NSUnitConverterLinear {}
54
55#[cfg(feature = "NSObject")]
56unsafe impl NSSecureCoding for NSUnitConverterLinear {}
57
58impl NSUnitConverterLinear {
59 extern_methods!(
60 #[unsafe(method(coefficient))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn coefficient(&self) -> c_double;
63
64 #[unsafe(method(constant))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn constant(&self) -> c_double;
67
68 #[unsafe(method(initWithCoefficient:))]
69 #[unsafe(method_family = init)]
70 pub unsafe fn initWithCoefficient(
71 this: Allocated<Self>,
72 coefficient: c_double,
73 ) -> Retained<Self>;
74
75 #[unsafe(method(initWithCoefficient:constant:))]
76 #[unsafe(method_family = init)]
77 pub unsafe fn initWithCoefficient_constant(
78 this: Allocated<Self>,
79 coefficient: c_double,
80 constant: c_double,
81 ) -> Retained<Self>;
82 );
83}
84
85impl NSUnitConverterLinear {
87 extern_methods!(
88 #[unsafe(method(init))]
89 #[unsafe(method_family = init)]
90 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
91
92 #[unsafe(method(new))]
93 #[unsafe(method_family = new)]
94 pub unsafe fn new() -> Retained<Self>;
95 );
96}
97
98extern_class!(
99 #[unsafe(super(NSObject))]
101 #[derive(Debug, PartialEq, Eq, Hash)]
102 pub struct NSUnit;
103);
104
105#[cfg(feature = "NSObject")]
106unsafe impl NSCoding for NSUnit {}
107
108#[cfg(feature = "NSObject")]
109unsafe impl NSCopying for NSUnit {}
110
111#[cfg(feature = "NSObject")]
112unsafe impl CopyingHelper for NSUnit {
113 type Result = Self;
114}
115
116unsafe impl NSObjectProtocol for NSUnit {}
117
118#[cfg(feature = "NSObject")]
119unsafe impl NSSecureCoding for NSUnit {}
120
121impl NSUnit {
122 extern_methods!(
123 #[cfg(feature = "NSString")]
124 #[unsafe(method(symbol))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn symbol(&self) -> Retained<NSString>;
127
128 #[unsafe(method(init))]
129 #[unsafe(method_family = init)]
130 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
131
132 #[unsafe(method(new))]
133 #[unsafe(method_family = new)]
134 pub unsafe fn new() -> Retained<Self>;
135
136 #[cfg(feature = "NSString")]
137 #[unsafe(method(initWithSymbol:))]
138 #[unsafe(method_family = init)]
139 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
140 );
141}
142
143extern_class!(
144 #[unsafe(super(NSUnit, NSObject))]
146 #[derive(Debug, PartialEq, Eq, Hash)]
147 pub struct NSDimension;
148);
149
150#[cfg(feature = "NSObject")]
151unsafe impl NSCoding for NSDimension {}
152
153#[cfg(feature = "NSObject")]
154unsafe impl NSCopying for NSDimension {}
155
156#[cfg(feature = "NSObject")]
157unsafe impl CopyingHelper for NSDimension {
158 type Result = Self;
159}
160
161unsafe impl NSObjectProtocol for NSDimension {}
162
163#[cfg(feature = "NSObject")]
164unsafe impl NSSecureCoding for NSDimension {}
165
166impl NSDimension {
167 extern_methods!(
168 #[unsafe(method(converter))]
169 #[unsafe(method_family = none)]
170 pub unsafe fn converter(&self) -> Retained<NSUnitConverter>;
171
172 #[cfg(feature = "NSString")]
173 #[unsafe(method(initWithSymbol:converter:))]
174 #[unsafe(method_family = init)]
175 pub unsafe fn initWithSymbol_converter(
176 this: Allocated<Self>,
177 symbol: &NSString,
178 converter: &NSUnitConverter,
179 ) -> Retained<Self>;
180
181 #[unsafe(method(baseUnit))]
182 #[unsafe(method_family = none)]
183 pub unsafe fn baseUnit() -> Retained<Self>;
184 );
185}
186
187impl NSDimension {
189 extern_methods!(
190 #[unsafe(method(init))]
191 #[unsafe(method_family = init)]
192 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
193
194 #[unsafe(method(new))]
195 #[unsafe(method_family = new)]
196 pub unsafe fn new() -> Retained<Self>;
197
198 #[cfg(feature = "NSString")]
199 #[unsafe(method(initWithSymbol:))]
200 #[unsafe(method_family = init)]
201 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
202 );
203}
204
205extern_class!(
206 #[unsafe(super(NSDimension, NSUnit, NSObject))]
208 #[derive(Debug, PartialEq, Eq, Hash)]
209 pub struct NSUnitAcceleration;
210);
211
212unsafe impl Send for NSUnitAcceleration {}
213
214unsafe impl Sync for NSUnitAcceleration {}
215
216#[cfg(feature = "NSObject")]
217unsafe impl NSCoding for NSUnitAcceleration {}
218
219#[cfg(feature = "NSObject")]
220unsafe impl NSCopying for NSUnitAcceleration {}
221
222#[cfg(feature = "NSObject")]
223unsafe impl CopyingHelper for NSUnitAcceleration {
224 type Result = Self;
225}
226
227unsafe impl NSObjectProtocol for NSUnitAcceleration {}
228
229#[cfg(feature = "NSObject")]
230unsafe impl NSSecureCoding for NSUnitAcceleration {}
231
232impl NSUnitAcceleration {
233 extern_methods!(
234 #[unsafe(method(metersPerSecondSquared))]
235 #[unsafe(method_family = none)]
236 pub unsafe fn metersPerSecondSquared() -> Retained<NSUnitAcceleration>;
237
238 #[unsafe(method(gravity))]
239 #[unsafe(method_family = none)]
240 pub unsafe fn gravity() -> Retained<NSUnitAcceleration>;
241 );
242}
243
244impl NSUnitAcceleration {
246 extern_methods!(
247 #[cfg(feature = "NSString")]
248 #[unsafe(method(initWithSymbol:converter:))]
249 #[unsafe(method_family = init)]
250 pub unsafe fn initWithSymbol_converter(
251 this: Allocated<Self>,
252 symbol: &NSString,
253 converter: &NSUnitConverter,
254 ) -> Retained<Self>;
255
256 #[unsafe(method(baseUnit))]
257 #[unsafe(method_family = none)]
258 pub unsafe fn baseUnit() -> Retained<Self>;
259 );
260}
261
262impl NSUnitAcceleration {
264 extern_methods!(
265 #[unsafe(method(init))]
266 #[unsafe(method_family = init)]
267 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
268
269 #[unsafe(method(new))]
270 #[unsafe(method_family = new)]
271 pub unsafe fn new() -> Retained<Self>;
272
273 #[cfg(feature = "NSString")]
274 #[unsafe(method(initWithSymbol:))]
275 #[unsafe(method_family = init)]
276 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
277 );
278}
279
280extern_class!(
281 #[unsafe(super(NSDimension, NSUnit, NSObject))]
283 #[derive(Debug, PartialEq, Eq, Hash)]
284 pub struct NSUnitAngle;
285);
286
287unsafe impl Send for NSUnitAngle {}
288
289unsafe impl Sync for NSUnitAngle {}
290
291#[cfg(feature = "NSObject")]
292unsafe impl NSCoding for NSUnitAngle {}
293
294#[cfg(feature = "NSObject")]
295unsafe impl NSCopying for NSUnitAngle {}
296
297#[cfg(feature = "NSObject")]
298unsafe impl CopyingHelper for NSUnitAngle {
299 type Result = Self;
300}
301
302unsafe impl NSObjectProtocol for NSUnitAngle {}
303
304#[cfg(feature = "NSObject")]
305unsafe impl NSSecureCoding for NSUnitAngle {}
306
307impl NSUnitAngle {
308 extern_methods!(
309 #[unsafe(method(degrees))]
310 #[unsafe(method_family = none)]
311 pub unsafe fn degrees() -> Retained<NSUnitAngle>;
312
313 #[unsafe(method(arcMinutes))]
314 #[unsafe(method_family = none)]
315 pub unsafe fn arcMinutes() -> Retained<NSUnitAngle>;
316
317 #[unsafe(method(arcSeconds))]
318 #[unsafe(method_family = none)]
319 pub unsafe fn arcSeconds() -> Retained<NSUnitAngle>;
320
321 #[unsafe(method(radians))]
322 #[unsafe(method_family = none)]
323 pub unsafe fn radians() -> Retained<NSUnitAngle>;
324
325 #[unsafe(method(gradians))]
326 #[unsafe(method_family = none)]
327 pub unsafe fn gradians() -> Retained<NSUnitAngle>;
328
329 #[unsafe(method(revolutions))]
330 #[unsafe(method_family = none)]
331 pub unsafe fn revolutions() -> Retained<NSUnitAngle>;
332 );
333}
334
335impl NSUnitAngle {
337 extern_methods!(
338 #[cfg(feature = "NSString")]
339 #[unsafe(method(initWithSymbol:converter:))]
340 #[unsafe(method_family = init)]
341 pub unsafe fn initWithSymbol_converter(
342 this: Allocated<Self>,
343 symbol: &NSString,
344 converter: &NSUnitConverter,
345 ) -> Retained<Self>;
346
347 #[unsafe(method(baseUnit))]
348 #[unsafe(method_family = none)]
349 pub unsafe fn baseUnit() -> Retained<Self>;
350 );
351}
352
353impl NSUnitAngle {
355 extern_methods!(
356 #[unsafe(method(init))]
357 #[unsafe(method_family = init)]
358 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
359
360 #[unsafe(method(new))]
361 #[unsafe(method_family = new)]
362 pub unsafe fn new() -> Retained<Self>;
363
364 #[cfg(feature = "NSString")]
365 #[unsafe(method(initWithSymbol:))]
366 #[unsafe(method_family = init)]
367 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
368 );
369}
370
371extern_class!(
372 #[unsafe(super(NSDimension, NSUnit, NSObject))]
374 #[derive(Debug, PartialEq, Eq, Hash)]
375 pub struct NSUnitArea;
376);
377
378unsafe impl Send for NSUnitArea {}
379
380unsafe impl Sync for NSUnitArea {}
381
382#[cfg(feature = "NSObject")]
383unsafe impl NSCoding for NSUnitArea {}
384
385#[cfg(feature = "NSObject")]
386unsafe impl NSCopying for NSUnitArea {}
387
388#[cfg(feature = "NSObject")]
389unsafe impl CopyingHelper for NSUnitArea {
390 type Result = Self;
391}
392
393unsafe impl NSObjectProtocol for NSUnitArea {}
394
395#[cfg(feature = "NSObject")]
396unsafe impl NSSecureCoding for NSUnitArea {}
397
398impl NSUnitArea {
399 extern_methods!(
400 #[unsafe(method(squareMegameters))]
401 #[unsafe(method_family = none)]
402 pub unsafe fn squareMegameters() -> Retained<NSUnitArea>;
403
404 #[unsafe(method(squareKilometers))]
405 #[unsafe(method_family = none)]
406 pub unsafe fn squareKilometers() -> Retained<NSUnitArea>;
407
408 #[unsafe(method(squareMeters))]
409 #[unsafe(method_family = none)]
410 pub unsafe fn squareMeters() -> Retained<NSUnitArea>;
411
412 #[unsafe(method(squareCentimeters))]
413 #[unsafe(method_family = none)]
414 pub unsafe fn squareCentimeters() -> Retained<NSUnitArea>;
415
416 #[unsafe(method(squareMillimeters))]
417 #[unsafe(method_family = none)]
418 pub unsafe fn squareMillimeters() -> Retained<NSUnitArea>;
419
420 #[unsafe(method(squareMicrometers))]
421 #[unsafe(method_family = none)]
422 pub unsafe fn squareMicrometers() -> Retained<NSUnitArea>;
423
424 #[unsafe(method(squareNanometers))]
425 #[unsafe(method_family = none)]
426 pub unsafe fn squareNanometers() -> Retained<NSUnitArea>;
427
428 #[unsafe(method(squareInches))]
429 #[unsafe(method_family = none)]
430 pub unsafe fn squareInches() -> Retained<NSUnitArea>;
431
432 #[unsafe(method(squareFeet))]
433 #[unsafe(method_family = none)]
434 pub unsafe fn squareFeet() -> Retained<NSUnitArea>;
435
436 #[unsafe(method(squareYards))]
437 #[unsafe(method_family = none)]
438 pub unsafe fn squareYards() -> Retained<NSUnitArea>;
439
440 #[unsafe(method(squareMiles))]
441 #[unsafe(method_family = none)]
442 pub unsafe fn squareMiles() -> Retained<NSUnitArea>;
443
444 #[unsafe(method(acres))]
445 #[unsafe(method_family = none)]
446 pub unsafe fn acres() -> Retained<NSUnitArea>;
447
448 #[unsafe(method(ares))]
449 #[unsafe(method_family = none)]
450 pub unsafe fn ares() -> Retained<NSUnitArea>;
451
452 #[unsafe(method(hectares))]
453 #[unsafe(method_family = none)]
454 pub unsafe fn hectares() -> Retained<NSUnitArea>;
455 );
456}
457
458impl NSUnitArea {
460 extern_methods!(
461 #[cfg(feature = "NSString")]
462 #[unsafe(method(initWithSymbol:converter:))]
463 #[unsafe(method_family = init)]
464 pub unsafe fn initWithSymbol_converter(
465 this: Allocated<Self>,
466 symbol: &NSString,
467 converter: &NSUnitConverter,
468 ) -> Retained<Self>;
469
470 #[unsafe(method(baseUnit))]
471 #[unsafe(method_family = none)]
472 pub unsafe fn baseUnit() -> Retained<Self>;
473 );
474}
475
476impl NSUnitArea {
478 extern_methods!(
479 #[unsafe(method(init))]
480 #[unsafe(method_family = init)]
481 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
482
483 #[unsafe(method(new))]
484 #[unsafe(method_family = new)]
485 pub unsafe fn new() -> Retained<Self>;
486
487 #[cfg(feature = "NSString")]
488 #[unsafe(method(initWithSymbol:))]
489 #[unsafe(method_family = init)]
490 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
491 );
492}
493
494extern_class!(
495 #[unsafe(super(NSDimension, NSUnit, NSObject))]
497 #[derive(Debug, PartialEq, Eq, Hash)]
498 pub struct NSUnitConcentrationMass;
499);
500
501unsafe impl Send for NSUnitConcentrationMass {}
502
503unsafe impl Sync for NSUnitConcentrationMass {}
504
505#[cfg(feature = "NSObject")]
506unsafe impl NSCoding for NSUnitConcentrationMass {}
507
508#[cfg(feature = "NSObject")]
509unsafe impl NSCopying for NSUnitConcentrationMass {}
510
511#[cfg(feature = "NSObject")]
512unsafe impl CopyingHelper for NSUnitConcentrationMass {
513 type Result = Self;
514}
515
516unsafe impl NSObjectProtocol for NSUnitConcentrationMass {}
517
518#[cfg(feature = "NSObject")]
519unsafe impl NSSecureCoding for NSUnitConcentrationMass {}
520
521impl NSUnitConcentrationMass {
522 extern_methods!(
523 #[unsafe(method(gramsPerLiter))]
524 #[unsafe(method_family = none)]
525 pub unsafe fn gramsPerLiter() -> Retained<NSUnitConcentrationMass>;
526
527 #[unsafe(method(milligramsPerDeciliter))]
528 #[unsafe(method_family = none)]
529 pub unsafe fn milligramsPerDeciliter() -> Retained<NSUnitConcentrationMass>;
530
531 #[unsafe(method(millimolesPerLiterWithGramsPerMole:))]
532 #[unsafe(method_family = none)]
533 pub unsafe fn millimolesPerLiterWithGramsPerMole(
534 grams_per_mole: c_double,
535 ) -> Retained<NSUnitConcentrationMass>;
536 );
537}
538
539impl NSUnitConcentrationMass {
541 extern_methods!(
542 #[cfg(feature = "NSString")]
543 #[unsafe(method(initWithSymbol:converter:))]
544 #[unsafe(method_family = init)]
545 pub unsafe fn initWithSymbol_converter(
546 this: Allocated<Self>,
547 symbol: &NSString,
548 converter: &NSUnitConverter,
549 ) -> Retained<Self>;
550
551 #[unsafe(method(baseUnit))]
552 #[unsafe(method_family = none)]
553 pub unsafe fn baseUnit() -> Retained<Self>;
554 );
555}
556
557impl NSUnitConcentrationMass {
559 extern_methods!(
560 #[unsafe(method(init))]
561 #[unsafe(method_family = init)]
562 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
563
564 #[unsafe(method(new))]
565 #[unsafe(method_family = new)]
566 pub unsafe fn new() -> Retained<Self>;
567
568 #[cfg(feature = "NSString")]
569 #[unsafe(method(initWithSymbol:))]
570 #[unsafe(method_family = init)]
571 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
572 );
573}
574
575extern_class!(
576 #[unsafe(super(NSDimension, NSUnit, NSObject))]
578 #[derive(Debug, PartialEq, Eq, Hash)]
579 pub struct NSUnitDispersion;
580);
581
582unsafe impl Send for NSUnitDispersion {}
583
584unsafe impl Sync for NSUnitDispersion {}
585
586#[cfg(feature = "NSObject")]
587unsafe impl NSCoding for NSUnitDispersion {}
588
589#[cfg(feature = "NSObject")]
590unsafe impl NSCopying for NSUnitDispersion {}
591
592#[cfg(feature = "NSObject")]
593unsafe impl CopyingHelper for NSUnitDispersion {
594 type Result = Self;
595}
596
597unsafe impl NSObjectProtocol for NSUnitDispersion {}
598
599#[cfg(feature = "NSObject")]
600unsafe impl NSSecureCoding for NSUnitDispersion {}
601
602impl NSUnitDispersion {
603 extern_methods!(
604 #[unsafe(method(partsPerMillion))]
605 #[unsafe(method_family = none)]
606 pub unsafe fn partsPerMillion() -> Retained<NSUnitDispersion>;
607 );
608}
609
610impl NSUnitDispersion {
612 extern_methods!(
613 #[cfg(feature = "NSString")]
614 #[unsafe(method(initWithSymbol:converter:))]
615 #[unsafe(method_family = init)]
616 pub unsafe fn initWithSymbol_converter(
617 this: Allocated<Self>,
618 symbol: &NSString,
619 converter: &NSUnitConverter,
620 ) -> Retained<Self>;
621
622 #[unsafe(method(baseUnit))]
623 #[unsafe(method_family = none)]
624 pub unsafe fn baseUnit() -> Retained<Self>;
625 );
626}
627
628impl NSUnitDispersion {
630 extern_methods!(
631 #[unsafe(method(init))]
632 #[unsafe(method_family = init)]
633 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
634
635 #[unsafe(method(new))]
636 #[unsafe(method_family = new)]
637 pub unsafe fn new() -> Retained<Self>;
638
639 #[cfg(feature = "NSString")]
640 #[unsafe(method(initWithSymbol:))]
641 #[unsafe(method_family = init)]
642 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
643 );
644}
645
646extern_class!(
647 #[unsafe(super(NSDimension, NSUnit, NSObject))]
649 #[derive(Debug, PartialEq, Eq, Hash)]
650 pub struct NSUnitDuration;
651);
652
653unsafe impl Send for NSUnitDuration {}
654
655unsafe impl Sync for NSUnitDuration {}
656
657#[cfg(feature = "NSObject")]
658unsafe impl NSCoding for NSUnitDuration {}
659
660#[cfg(feature = "NSObject")]
661unsafe impl NSCopying for NSUnitDuration {}
662
663#[cfg(feature = "NSObject")]
664unsafe impl CopyingHelper for NSUnitDuration {
665 type Result = Self;
666}
667
668unsafe impl NSObjectProtocol for NSUnitDuration {}
669
670#[cfg(feature = "NSObject")]
671unsafe impl NSSecureCoding for NSUnitDuration {}
672
673impl NSUnitDuration {
674 extern_methods!(
675 #[unsafe(method(hours))]
676 #[unsafe(method_family = none)]
677 pub unsafe fn hours() -> Retained<NSUnitDuration>;
678
679 #[unsafe(method(minutes))]
680 #[unsafe(method_family = none)]
681 pub unsafe fn minutes() -> Retained<NSUnitDuration>;
682
683 #[unsafe(method(seconds))]
684 #[unsafe(method_family = none)]
685 pub unsafe fn seconds() -> Retained<NSUnitDuration>;
686
687 #[unsafe(method(milliseconds))]
688 #[unsafe(method_family = none)]
689 pub unsafe fn milliseconds() -> Retained<NSUnitDuration>;
690
691 #[unsafe(method(microseconds))]
692 #[unsafe(method_family = none)]
693 pub unsafe fn microseconds() -> Retained<NSUnitDuration>;
694
695 #[unsafe(method(nanoseconds))]
696 #[unsafe(method_family = none)]
697 pub unsafe fn nanoseconds() -> Retained<NSUnitDuration>;
698
699 #[unsafe(method(picoseconds))]
700 #[unsafe(method_family = none)]
701 pub unsafe fn picoseconds() -> Retained<NSUnitDuration>;
702 );
703}
704
705impl NSUnitDuration {
707 extern_methods!(
708 #[cfg(feature = "NSString")]
709 #[unsafe(method(initWithSymbol:converter:))]
710 #[unsafe(method_family = init)]
711 pub unsafe fn initWithSymbol_converter(
712 this: Allocated<Self>,
713 symbol: &NSString,
714 converter: &NSUnitConverter,
715 ) -> Retained<Self>;
716
717 #[unsafe(method(baseUnit))]
718 #[unsafe(method_family = none)]
719 pub unsafe fn baseUnit() -> Retained<Self>;
720 );
721}
722
723impl NSUnitDuration {
725 extern_methods!(
726 #[unsafe(method(init))]
727 #[unsafe(method_family = init)]
728 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
729
730 #[unsafe(method(new))]
731 #[unsafe(method_family = new)]
732 pub unsafe fn new() -> Retained<Self>;
733
734 #[cfg(feature = "NSString")]
735 #[unsafe(method(initWithSymbol:))]
736 #[unsafe(method_family = init)]
737 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
738 );
739}
740
741extern_class!(
742 #[unsafe(super(NSDimension, NSUnit, NSObject))]
744 #[derive(Debug, PartialEq, Eq, Hash)]
745 pub struct NSUnitElectricCharge;
746);
747
748unsafe impl Send for NSUnitElectricCharge {}
749
750unsafe impl Sync for NSUnitElectricCharge {}
751
752#[cfg(feature = "NSObject")]
753unsafe impl NSCoding for NSUnitElectricCharge {}
754
755#[cfg(feature = "NSObject")]
756unsafe impl NSCopying for NSUnitElectricCharge {}
757
758#[cfg(feature = "NSObject")]
759unsafe impl CopyingHelper for NSUnitElectricCharge {
760 type Result = Self;
761}
762
763unsafe impl NSObjectProtocol for NSUnitElectricCharge {}
764
765#[cfg(feature = "NSObject")]
766unsafe impl NSSecureCoding for NSUnitElectricCharge {}
767
768impl NSUnitElectricCharge {
769 extern_methods!(
770 #[unsafe(method(coulombs))]
771 #[unsafe(method_family = none)]
772 pub unsafe fn coulombs() -> Retained<NSUnitElectricCharge>;
773
774 #[unsafe(method(megaampereHours))]
775 #[unsafe(method_family = none)]
776 pub unsafe fn megaampereHours() -> Retained<NSUnitElectricCharge>;
777
778 #[unsafe(method(kiloampereHours))]
779 #[unsafe(method_family = none)]
780 pub unsafe fn kiloampereHours() -> Retained<NSUnitElectricCharge>;
781
782 #[unsafe(method(ampereHours))]
783 #[unsafe(method_family = none)]
784 pub unsafe fn ampereHours() -> Retained<NSUnitElectricCharge>;
785
786 #[unsafe(method(milliampereHours))]
787 #[unsafe(method_family = none)]
788 pub unsafe fn milliampereHours() -> Retained<NSUnitElectricCharge>;
789
790 #[unsafe(method(microampereHours))]
791 #[unsafe(method_family = none)]
792 pub unsafe fn microampereHours() -> Retained<NSUnitElectricCharge>;
793 );
794}
795
796impl NSUnitElectricCharge {
798 extern_methods!(
799 #[cfg(feature = "NSString")]
800 #[unsafe(method(initWithSymbol:converter:))]
801 #[unsafe(method_family = init)]
802 pub unsafe fn initWithSymbol_converter(
803 this: Allocated<Self>,
804 symbol: &NSString,
805 converter: &NSUnitConverter,
806 ) -> Retained<Self>;
807
808 #[unsafe(method(baseUnit))]
809 #[unsafe(method_family = none)]
810 pub unsafe fn baseUnit() -> Retained<Self>;
811 );
812}
813
814impl NSUnitElectricCharge {
816 extern_methods!(
817 #[unsafe(method(init))]
818 #[unsafe(method_family = init)]
819 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
820
821 #[unsafe(method(new))]
822 #[unsafe(method_family = new)]
823 pub unsafe fn new() -> Retained<Self>;
824
825 #[cfg(feature = "NSString")]
826 #[unsafe(method(initWithSymbol:))]
827 #[unsafe(method_family = init)]
828 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
829 );
830}
831
832extern_class!(
833 #[unsafe(super(NSDimension, NSUnit, NSObject))]
835 #[derive(Debug, PartialEq, Eq, Hash)]
836 pub struct NSUnitElectricCurrent;
837);
838
839unsafe impl Send for NSUnitElectricCurrent {}
840
841unsafe impl Sync for NSUnitElectricCurrent {}
842
843#[cfg(feature = "NSObject")]
844unsafe impl NSCoding for NSUnitElectricCurrent {}
845
846#[cfg(feature = "NSObject")]
847unsafe impl NSCopying for NSUnitElectricCurrent {}
848
849#[cfg(feature = "NSObject")]
850unsafe impl CopyingHelper for NSUnitElectricCurrent {
851 type Result = Self;
852}
853
854unsafe impl NSObjectProtocol for NSUnitElectricCurrent {}
855
856#[cfg(feature = "NSObject")]
857unsafe impl NSSecureCoding for NSUnitElectricCurrent {}
858
859impl NSUnitElectricCurrent {
860 extern_methods!(
861 #[unsafe(method(megaamperes))]
862 #[unsafe(method_family = none)]
863 pub unsafe fn megaamperes() -> Retained<NSUnitElectricCurrent>;
864
865 #[unsafe(method(kiloamperes))]
866 #[unsafe(method_family = none)]
867 pub unsafe fn kiloamperes() -> Retained<NSUnitElectricCurrent>;
868
869 #[unsafe(method(amperes))]
870 #[unsafe(method_family = none)]
871 pub unsafe fn amperes() -> Retained<NSUnitElectricCurrent>;
872
873 #[unsafe(method(milliamperes))]
874 #[unsafe(method_family = none)]
875 pub unsafe fn milliamperes() -> Retained<NSUnitElectricCurrent>;
876
877 #[unsafe(method(microamperes))]
878 #[unsafe(method_family = none)]
879 pub unsafe fn microamperes() -> Retained<NSUnitElectricCurrent>;
880 );
881}
882
883impl NSUnitElectricCurrent {
885 extern_methods!(
886 #[cfg(feature = "NSString")]
887 #[unsafe(method(initWithSymbol:converter:))]
888 #[unsafe(method_family = init)]
889 pub unsafe fn initWithSymbol_converter(
890 this: Allocated<Self>,
891 symbol: &NSString,
892 converter: &NSUnitConverter,
893 ) -> Retained<Self>;
894
895 #[unsafe(method(baseUnit))]
896 #[unsafe(method_family = none)]
897 pub unsafe fn baseUnit() -> Retained<Self>;
898 );
899}
900
901impl NSUnitElectricCurrent {
903 extern_methods!(
904 #[unsafe(method(init))]
905 #[unsafe(method_family = init)]
906 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
907
908 #[unsafe(method(new))]
909 #[unsafe(method_family = new)]
910 pub unsafe fn new() -> Retained<Self>;
911
912 #[cfg(feature = "NSString")]
913 #[unsafe(method(initWithSymbol:))]
914 #[unsafe(method_family = init)]
915 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
916 );
917}
918
919extern_class!(
920 #[unsafe(super(NSDimension, NSUnit, NSObject))]
922 #[derive(Debug, PartialEq, Eq, Hash)]
923 pub struct NSUnitElectricPotentialDifference;
924);
925
926unsafe impl Send for NSUnitElectricPotentialDifference {}
927
928unsafe impl Sync for NSUnitElectricPotentialDifference {}
929
930#[cfg(feature = "NSObject")]
931unsafe impl NSCoding for NSUnitElectricPotentialDifference {}
932
933#[cfg(feature = "NSObject")]
934unsafe impl NSCopying for NSUnitElectricPotentialDifference {}
935
936#[cfg(feature = "NSObject")]
937unsafe impl CopyingHelper for NSUnitElectricPotentialDifference {
938 type Result = Self;
939}
940
941unsafe impl NSObjectProtocol for NSUnitElectricPotentialDifference {}
942
943#[cfg(feature = "NSObject")]
944unsafe impl NSSecureCoding for NSUnitElectricPotentialDifference {}
945
946impl NSUnitElectricPotentialDifference {
947 extern_methods!(
948 #[unsafe(method(megavolts))]
949 #[unsafe(method_family = none)]
950 pub unsafe fn megavolts() -> Retained<NSUnitElectricPotentialDifference>;
951
952 #[unsafe(method(kilovolts))]
953 #[unsafe(method_family = none)]
954 pub unsafe fn kilovolts() -> Retained<NSUnitElectricPotentialDifference>;
955
956 #[unsafe(method(volts))]
957 #[unsafe(method_family = none)]
958 pub unsafe fn volts() -> Retained<NSUnitElectricPotentialDifference>;
959
960 #[unsafe(method(millivolts))]
961 #[unsafe(method_family = none)]
962 pub unsafe fn millivolts() -> Retained<NSUnitElectricPotentialDifference>;
963
964 #[unsafe(method(microvolts))]
965 #[unsafe(method_family = none)]
966 pub unsafe fn microvolts() -> Retained<NSUnitElectricPotentialDifference>;
967 );
968}
969
970impl NSUnitElectricPotentialDifference {
972 extern_methods!(
973 #[cfg(feature = "NSString")]
974 #[unsafe(method(initWithSymbol:converter:))]
975 #[unsafe(method_family = init)]
976 pub unsafe fn initWithSymbol_converter(
977 this: Allocated<Self>,
978 symbol: &NSString,
979 converter: &NSUnitConverter,
980 ) -> Retained<Self>;
981
982 #[unsafe(method(baseUnit))]
983 #[unsafe(method_family = none)]
984 pub unsafe fn baseUnit() -> Retained<Self>;
985 );
986}
987
988impl NSUnitElectricPotentialDifference {
990 extern_methods!(
991 #[unsafe(method(init))]
992 #[unsafe(method_family = init)]
993 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
994
995 #[unsafe(method(new))]
996 #[unsafe(method_family = new)]
997 pub unsafe fn new() -> Retained<Self>;
998
999 #[cfg(feature = "NSString")]
1000 #[unsafe(method(initWithSymbol:))]
1001 #[unsafe(method_family = init)]
1002 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
1003 );
1004}
1005
1006extern_class!(
1007 #[unsafe(super(NSDimension, NSUnit, NSObject))]
1009 #[derive(Debug, PartialEq, Eq, Hash)]
1010 pub struct NSUnitElectricResistance;
1011);
1012
1013unsafe impl Send for NSUnitElectricResistance {}
1014
1015unsafe impl Sync for NSUnitElectricResistance {}
1016
1017#[cfg(feature = "NSObject")]
1018unsafe impl NSCoding for NSUnitElectricResistance {}
1019
1020#[cfg(feature = "NSObject")]
1021unsafe impl NSCopying for NSUnitElectricResistance {}
1022
1023#[cfg(feature = "NSObject")]
1024unsafe impl CopyingHelper for NSUnitElectricResistance {
1025 type Result = Self;
1026}
1027
1028unsafe impl NSObjectProtocol for NSUnitElectricResistance {}
1029
1030#[cfg(feature = "NSObject")]
1031unsafe impl NSSecureCoding for NSUnitElectricResistance {}
1032
1033impl NSUnitElectricResistance {
1034 extern_methods!(
1035 #[unsafe(method(megaohms))]
1036 #[unsafe(method_family = none)]
1037 pub unsafe fn megaohms() -> Retained<NSUnitElectricResistance>;
1038
1039 #[unsafe(method(kiloohms))]
1040 #[unsafe(method_family = none)]
1041 pub unsafe fn kiloohms() -> Retained<NSUnitElectricResistance>;
1042
1043 #[unsafe(method(ohms))]
1044 #[unsafe(method_family = none)]
1045 pub unsafe fn ohms() -> Retained<NSUnitElectricResistance>;
1046
1047 #[unsafe(method(milliohms))]
1048 #[unsafe(method_family = none)]
1049 pub unsafe fn milliohms() -> Retained<NSUnitElectricResistance>;
1050
1051 #[unsafe(method(microohms))]
1052 #[unsafe(method_family = none)]
1053 pub unsafe fn microohms() -> Retained<NSUnitElectricResistance>;
1054 );
1055}
1056
1057impl NSUnitElectricResistance {
1059 extern_methods!(
1060 #[cfg(feature = "NSString")]
1061 #[unsafe(method(initWithSymbol:converter:))]
1062 #[unsafe(method_family = init)]
1063 pub unsafe fn initWithSymbol_converter(
1064 this: Allocated<Self>,
1065 symbol: &NSString,
1066 converter: &NSUnitConverter,
1067 ) -> Retained<Self>;
1068
1069 #[unsafe(method(baseUnit))]
1070 #[unsafe(method_family = none)]
1071 pub unsafe fn baseUnit() -> Retained<Self>;
1072 );
1073}
1074
1075impl NSUnitElectricResistance {
1077 extern_methods!(
1078 #[unsafe(method(init))]
1079 #[unsafe(method_family = init)]
1080 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1081
1082 #[unsafe(method(new))]
1083 #[unsafe(method_family = new)]
1084 pub unsafe fn new() -> Retained<Self>;
1085
1086 #[cfg(feature = "NSString")]
1087 #[unsafe(method(initWithSymbol:))]
1088 #[unsafe(method_family = init)]
1089 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
1090 );
1091}
1092
1093extern_class!(
1094 #[unsafe(super(NSDimension, NSUnit, NSObject))]
1096 #[derive(Debug, PartialEq, Eq, Hash)]
1097 pub struct NSUnitEnergy;
1098);
1099
1100unsafe impl Send for NSUnitEnergy {}
1101
1102unsafe impl Sync for NSUnitEnergy {}
1103
1104#[cfg(feature = "NSObject")]
1105unsafe impl NSCoding for NSUnitEnergy {}
1106
1107#[cfg(feature = "NSObject")]
1108unsafe impl NSCopying for NSUnitEnergy {}
1109
1110#[cfg(feature = "NSObject")]
1111unsafe impl CopyingHelper for NSUnitEnergy {
1112 type Result = Self;
1113}
1114
1115unsafe impl NSObjectProtocol for NSUnitEnergy {}
1116
1117#[cfg(feature = "NSObject")]
1118unsafe impl NSSecureCoding for NSUnitEnergy {}
1119
1120impl NSUnitEnergy {
1121 extern_methods!(
1122 #[unsafe(method(kilojoules))]
1123 #[unsafe(method_family = none)]
1124 pub unsafe fn kilojoules() -> Retained<NSUnitEnergy>;
1125
1126 #[unsafe(method(joules))]
1127 #[unsafe(method_family = none)]
1128 pub unsafe fn joules() -> Retained<NSUnitEnergy>;
1129
1130 #[unsafe(method(kilocalories))]
1131 #[unsafe(method_family = none)]
1132 pub unsafe fn kilocalories() -> Retained<NSUnitEnergy>;
1133
1134 #[unsafe(method(calories))]
1135 #[unsafe(method_family = none)]
1136 pub unsafe fn calories() -> Retained<NSUnitEnergy>;
1137
1138 #[unsafe(method(kilowattHours))]
1139 #[unsafe(method_family = none)]
1140 pub unsafe fn kilowattHours() -> Retained<NSUnitEnergy>;
1141 );
1142}
1143
1144impl NSUnitEnergy {
1146 extern_methods!(
1147 #[cfg(feature = "NSString")]
1148 #[unsafe(method(initWithSymbol:converter:))]
1149 #[unsafe(method_family = init)]
1150 pub unsafe fn initWithSymbol_converter(
1151 this: Allocated<Self>,
1152 symbol: &NSString,
1153 converter: &NSUnitConverter,
1154 ) -> Retained<Self>;
1155
1156 #[unsafe(method(baseUnit))]
1157 #[unsafe(method_family = none)]
1158 pub unsafe fn baseUnit() -> Retained<Self>;
1159 );
1160}
1161
1162impl NSUnitEnergy {
1164 extern_methods!(
1165 #[unsafe(method(init))]
1166 #[unsafe(method_family = init)]
1167 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1168
1169 #[unsafe(method(new))]
1170 #[unsafe(method_family = new)]
1171 pub unsafe fn new() -> Retained<Self>;
1172
1173 #[cfg(feature = "NSString")]
1174 #[unsafe(method(initWithSymbol:))]
1175 #[unsafe(method_family = init)]
1176 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
1177 );
1178}
1179
1180extern_class!(
1181 #[unsafe(super(NSDimension, NSUnit, NSObject))]
1183 #[derive(Debug, PartialEq, Eq, Hash)]
1184 pub struct NSUnitFrequency;
1185);
1186
1187unsafe impl Send for NSUnitFrequency {}
1188
1189unsafe impl Sync for NSUnitFrequency {}
1190
1191#[cfg(feature = "NSObject")]
1192unsafe impl NSCoding for NSUnitFrequency {}
1193
1194#[cfg(feature = "NSObject")]
1195unsafe impl NSCopying for NSUnitFrequency {}
1196
1197#[cfg(feature = "NSObject")]
1198unsafe impl CopyingHelper for NSUnitFrequency {
1199 type Result = Self;
1200}
1201
1202unsafe impl NSObjectProtocol for NSUnitFrequency {}
1203
1204#[cfg(feature = "NSObject")]
1205unsafe impl NSSecureCoding for NSUnitFrequency {}
1206
1207impl NSUnitFrequency {
1208 extern_methods!(
1209 #[unsafe(method(terahertz))]
1210 #[unsafe(method_family = none)]
1211 pub unsafe fn terahertz() -> Retained<NSUnitFrequency>;
1212
1213 #[unsafe(method(gigahertz))]
1214 #[unsafe(method_family = none)]
1215 pub unsafe fn gigahertz() -> Retained<NSUnitFrequency>;
1216
1217 #[unsafe(method(megahertz))]
1218 #[unsafe(method_family = none)]
1219 pub unsafe fn megahertz() -> Retained<NSUnitFrequency>;
1220
1221 #[unsafe(method(kilohertz))]
1222 #[unsafe(method_family = none)]
1223 pub unsafe fn kilohertz() -> Retained<NSUnitFrequency>;
1224
1225 #[unsafe(method(hertz))]
1226 #[unsafe(method_family = none)]
1227 pub unsafe fn hertz() -> Retained<NSUnitFrequency>;
1228
1229 #[unsafe(method(millihertz))]
1230 #[unsafe(method_family = none)]
1231 pub unsafe fn millihertz() -> Retained<NSUnitFrequency>;
1232
1233 #[unsafe(method(microhertz))]
1234 #[unsafe(method_family = none)]
1235 pub unsafe fn microhertz() -> Retained<NSUnitFrequency>;
1236
1237 #[unsafe(method(nanohertz))]
1238 #[unsafe(method_family = none)]
1239 pub unsafe fn nanohertz() -> Retained<NSUnitFrequency>;
1240
1241 #[unsafe(method(framesPerSecond))]
1242 #[unsafe(method_family = none)]
1243 pub unsafe fn framesPerSecond() -> Retained<NSUnitFrequency>;
1244 );
1245}
1246
1247impl NSUnitFrequency {
1249 extern_methods!(
1250 #[cfg(feature = "NSString")]
1251 #[unsafe(method(initWithSymbol:converter:))]
1252 #[unsafe(method_family = init)]
1253 pub unsafe fn initWithSymbol_converter(
1254 this: Allocated<Self>,
1255 symbol: &NSString,
1256 converter: &NSUnitConverter,
1257 ) -> Retained<Self>;
1258
1259 #[unsafe(method(baseUnit))]
1260 #[unsafe(method_family = none)]
1261 pub unsafe fn baseUnit() -> Retained<Self>;
1262 );
1263}
1264
1265impl NSUnitFrequency {
1267 extern_methods!(
1268 #[unsafe(method(init))]
1269 #[unsafe(method_family = init)]
1270 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1271
1272 #[unsafe(method(new))]
1273 #[unsafe(method_family = new)]
1274 pub unsafe fn new() -> Retained<Self>;
1275
1276 #[cfg(feature = "NSString")]
1277 #[unsafe(method(initWithSymbol:))]
1278 #[unsafe(method_family = init)]
1279 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
1280 );
1281}
1282
1283extern_class!(
1284 #[unsafe(super(NSDimension, NSUnit, NSObject))]
1286 #[derive(Debug, PartialEq, Eq, Hash)]
1287 pub struct NSUnitFuelEfficiency;
1288);
1289
1290unsafe impl Send for NSUnitFuelEfficiency {}
1291
1292unsafe impl Sync for NSUnitFuelEfficiency {}
1293
1294#[cfg(feature = "NSObject")]
1295unsafe impl NSCoding for NSUnitFuelEfficiency {}
1296
1297#[cfg(feature = "NSObject")]
1298unsafe impl NSCopying for NSUnitFuelEfficiency {}
1299
1300#[cfg(feature = "NSObject")]
1301unsafe impl CopyingHelper for NSUnitFuelEfficiency {
1302 type Result = Self;
1303}
1304
1305unsafe impl NSObjectProtocol for NSUnitFuelEfficiency {}
1306
1307#[cfg(feature = "NSObject")]
1308unsafe impl NSSecureCoding for NSUnitFuelEfficiency {}
1309
1310impl NSUnitFuelEfficiency {
1311 extern_methods!(
1312 #[unsafe(method(litersPer100Kilometers))]
1313 #[unsafe(method_family = none)]
1314 pub unsafe fn litersPer100Kilometers() -> Retained<NSUnitFuelEfficiency>;
1315
1316 #[unsafe(method(milesPerImperialGallon))]
1317 #[unsafe(method_family = none)]
1318 pub unsafe fn milesPerImperialGallon() -> Retained<NSUnitFuelEfficiency>;
1319
1320 #[unsafe(method(milesPerGallon))]
1321 #[unsafe(method_family = none)]
1322 pub unsafe fn milesPerGallon() -> Retained<NSUnitFuelEfficiency>;
1323 );
1324}
1325
1326impl NSUnitFuelEfficiency {
1328 extern_methods!(
1329 #[cfg(feature = "NSString")]
1330 #[unsafe(method(initWithSymbol:converter:))]
1331 #[unsafe(method_family = init)]
1332 pub unsafe fn initWithSymbol_converter(
1333 this: Allocated<Self>,
1334 symbol: &NSString,
1335 converter: &NSUnitConverter,
1336 ) -> Retained<Self>;
1337
1338 #[unsafe(method(baseUnit))]
1339 #[unsafe(method_family = none)]
1340 pub unsafe fn baseUnit() -> Retained<Self>;
1341 );
1342}
1343
1344impl NSUnitFuelEfficiency {
1346 extern_methods!(
1347 #[unsafe(method(init))]
1348 #[unsafe(method_family = init)]
1349 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1350
1351 #[unsafe(method(new))]
1352 #[unsafe(method_family = new)]
1353 pub unsafe fn new() -> Retained<Self>;
1354
1355 #[cfg(feature = "NSString")]
1356 #[unsafe(method(initWithSymbol:))]
1357 #[unsafe(method_family = init)]
1358 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
1359 );
1360}
1361
1362extern_class!(
1363 #[unsafe(super(NSDimension, NSUnit, NSObject))]
1365 #[derive(Debug, PartialEq, Eq, Hash)]
1366 pub struct NSUnitInformationStorage;
1367);
1368
1369unsafe impl Send for NSUnitInformationStorage {}
1370
1371unsafe impl Sync for NSUnitInformationStorage {}
1372
1373#[cfg(feature = "NSObject")]
1374unsafe impl NSCoding for NSUnitInformationStorage {}
1375
1376#[cfg(feature = "NSObject")]
1377unsafe impl NSCopying for NSUnitInformationStorage {}
1378
1379#[cfg(feature = "NSObject")]
1380unsafe impl CopyingHelper for NSUnitInformationStorage {
1381 type Result = Self;
1382}
1383
1384unsafe impl NSObjectProtocol for NSUnitInformationStorage {}
1385
1386#[cfg(feature = "NSObject")]
1387unsafe impl NSSecureCoding for NSUnitInformationStorage {}
1388
1389impl NSUnitInformationStorage {
1390 extern_methods!(
1391 #[unsafe(method(bytes))]
1392 #[unsafe(method_family = none)]
1393 pub unsafe fn bytes() -> Retained<NSUnitInformationStorage>;
1394
1395 #[unsafe(method(bits))]
1396 #[unsafe(method_family = none)]
1397 pub unsafe fn bits() -> Retained<NSUnitInformationStorage>;
1398
1399 #[unsafe(method(nibbles))]
1400 #[unsafe(method_family = none)]
1401 pub unsafe fn nibbles() -> Retained<NSUnitInformationStorage>;
1402
1403 #[unsafe(method(yottabytes))]
1404 #[unsafe(method_family = none)]
1405 pub unsafe fn yottabytes() -> Retained<NSUnitInformationStorage>;
1406
1407 #[unsafe(method(zettabytes))]
1408 #[unsafe(method_family = none)]
1409 pub unsafe fn zettabytes() -> Retained<NSUnitInformationStorage>;
1410
1411 #[unsafe(method(exabytes))]
1412 #[unsafe(method_family = none)]
1413 pub unsafe fn exabytes() -> Retained<NSUnitInformationStorage>;
1414
1415 #[unsafe(method(petabytes))]
1416 #[unsafe(method_family = none)]
1417 pub unsafe fn petabytes() -> Retained<NSUnitInformationStorage>;
1418
1419 #[unsafe(method(terabytes))]
1420 #[unsafe(method_family = none)]
1421 pub unsafe fn terabytes() -> Retained<NSUnitInformationStorage>;
1422
1423 #[unsafe(method(gigabytes))]
1424 #[unsafe(method_family = none)]
1425 pub unsafe fn gigabytes() -> Retained<NSUnitInformationStorage>;
1426
1427 #[unsafe(method(megabytes))]
1428 #[unsafe(method_family = none)]
1429 pub unsafe fn megabytes() -> Retained<NSUnitInformationStorage>;
1430
1431 #[unsafe(method(kilobytes))]
1432 #[unsafe(method_family = none)]
1433 pub unsafe fn kilobytes() -> Retained<NSUnitInformationStorage>;
1434
1435 #[unsafe(method(yottabits))]
1436 #[unsafe(method_family = none)]
1437 pub unsafe fn yottabits() -> Retained<NSUnitInformationStorage>;
1438
1439 #[unsafe(method(zettabits))]
1440 #[unsafe(method_family = none)]
1441 pub unsafe fn zettabits() -> Retained<NSUnitInformationStorage>;
1442
1443 #[unsafe(method(exabits))]
1444 #[unsafe(method_family = none)]
1445 pub unsafe fn exabits() -> Retained<NSUnitInformationStorage>;
1446
1447 #[unsafe(method(petabits))]
1448 #[unsafe(method_family = none)]
1449 pub unsafe fn petabits() -> Retained<NSUnitInformationStorage>;
1450
1451 #[unsafe(method(terabits))]
1452 #[unsafe(method_family = none)]
1453 pub unsafe fn terabits() -> Retained<NSUnitInformationStorage>;
1454
1455 #[unsafe(method(gigabits))]
1456 #[unsafe(method_family = none)]
1457 pub unsafe fn gigabits() -> Retained<NSUnitInformationStorage>;
1458
1459 #[unsafe(method(megabits))]
1460 #[unsafe(method_family = none)]
1461 pub unsafe fn megabits() -> Retained<NSUnitInformationStorage>;
1462
1463 #[unsafe(method(kilobits))]
1464 #[unsafe(method_family = none)]
1465 pub unsafe fn kilobits() -> Retained<NSUnitInformationStorage>;
1466
1467 #[unsafe(method(yobibytes))]
1468 #[unsafe(method_family = none)]
1469 pub unsafe fn yobibytes() -> Retained<NSUnitInformationStorage>;
1470
1471 #[unsafe(method(zebibytes))]
1472 #[unsafe(method_family = none)]
1473 pub unsafe fn zebibytes() -> Retained<NSUnitInformationStorage>;
1474
1475 #[unsafe(method(exbibytes))]
1476 #[unsafe(method_family = none)]
1477 pub unsafe fn exbibytes() -> Retained<NSUnitInformationStorage>;
1478
1479 #[unsafe(method(pebibytes))]
1480 #[unsafe(method_family = none)]
1481 pub unsafe fn pebibytes() -> Retained<NSUnitInformationStorage>;
1482
1483 #[unsafe(method(tebibytes))]
1484 #[unsafe(method_family = none)]
1485 pub unsafe fn tebibytes() -> Retained<NSUnitInformationStorage>;
1486
1487 #[unsafe(method(gibibytes))]
1488 #[unsafe(method_family = none)]
1489 pub unsafe fn gibibytes() -> Retained<NSUnitInformationStorage>;
1490
1491 #[unsafe(method(mebibytes))]
1492 #[unsafe(method_family = none)]
1493 pub unsafe fn mebibytes() -> Retained<NSUnitInformationStorage>;
1494
1495 #[unsafe(method(kibibytes))]
1496 #[unsafe(method_family = none)]
1497 pub unsafe fn kibibytes() -> Retained<NSUnitInformationStorage>;
1498
1499 #[unsafe(method(yobibits))]
1500 #[unsafe(method_family = none)]
1501 pub unsafe fn yobibits() -> Retained<NSUnitInformationStorage>;
1502
1503 #[unsafe(method(zebibits))]
1504 #[unsafe(method_family = none)]
1505 pub unsafe fn zebibits() -> Retained<NSUnitInformationStorage>;
1506
1507 #[unsafe(method(exbibits))]
1508 #[unsafe(method_family = none)]
1509 pub unsafe fn exbibits() -> Retained<NSUnitInformationStorage>;
1510
1511 #[unsafe(method(pebibits))]
1512 #[unsafe(method_family = none)]
1513 pub unsafe fn pebibits() -> Retained<NSUnitInformationStorage>;
1514
1515 #[unsafe(method(tebibits))]
1516 #[unsafe(method_family = none)]
1517 pub unsafe fn tebibits() -> Retained<NSUnitInformationStorage>;
1518
1519 #[unsafe(method(gibibits))]
1520 #[unsafe(method_family = none)]
1521 pub unsafe fn gibibits() -> Retained<NSUnitInformationStorage>;
1522
1523 #[unsafe(method(mebibits))]
1524 #[unsafe(method_family = none)]
1525 pub unsafe fn mebibits() -> Retained<NSUnitInformationStorage>;
1526
1527 #[unsafe(method(kibibits))]
1528 #[unsafe(method_family = none)]
1529 pub unsafe fn kibibits() -> Retained<NSUnitInformationStorage>;
1530 );
1531}
1532
1533impl NSUnitInformationStorage {
1535 extern_methods!(
1536 #[cfg(feature = "NSString")]
1537 #[unsafe(method(initWithSymbol:converter:))]
1538 #[unsafe(method_family = init)]
1539 pub unsafe fn initWithSymbol_converter(
1540 this: Allocated<Self>,
1541 symbol: &NSString,
1542 converter: &NSUnitConverter,
1543 ) -> Retained<Self>;
1544
1545 #[unsafe(method(baseUnit))]
1546 #[unsafe(method_family = none)]
1547 pub unsafe fn baseUnit() -> Retained<Self>;
1548 );
1549}
1550
1551impl NSUnitInformationStorage {
1553 extern_methods!(
1554 #[unsafe(method(init))]
1555 #[unsafe(method_family = init)]
1556 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1557
1558 #[unsafe(method(new))]
1559 #[unsafe(method_family = new)]
1560 pub unsafe fn new() -> Retained<Self>;
1561
1562 #[cfg(feature = "NSString")]
1563 #[unsafe(method(initWithSymbol:))]
1564 #[unsafe(method_family = init)]
1565 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
1566 );
1567}
1568
1569extern_class!(
1570 #[unsafe(super(NSDimension, NSUnit, NSObject))]
1572 #[derive(Debug, PartialEq, Eq, Hash)]
1573 pub struct NSUnitLength;
1574);
1575
1576unsafe impl Send for NSUnitLength {}
1577
1578unsafe impl Sync for NSUnitLength {}
1579
1580#[cfg(feature = "NSObject")]
1581unsafe impl NSCoding for NSUnitLength {}
1582
1583#[cfg(feature = "NSObject")]
1584unsafe impl NSCopying for NSUnitLength {}
1585
1586#[cfg(feature = "NSObject")]
1587unsafe impl CopyingHelper for NSUnitLength {
1588 type Result = Self;
1589}
1590
1591unsafe impl NSObjectProtocol for NSUnitLength {}
1592
1593#[cfg(feature = "NSObject")]
1594unsafe impl NSSecureCoding for NSUnitLength {}
1595
1596impl NSUnitLength {
1597 extern_methods!(
1598 #[unsafe(method(megameters))]
1599 #[unsafe(method_family = none)]
1600 pub unsafe fn megameters() -> Retained<NSUnitLength>;
1601
1602 #[unsafe(method(kilometers))]
1603 #[unsafe(method_family = none)]
1604 pub unsafe fn kilometers() -> Retained<NSUnitLength>;
1605
1606 #[unsafe(method(hectometers))]
1607 #[unsafe(method_family = none)]
1608 pub unsafe fn hectometers() -> Retained<NSUnitLength>;
1609
1610 #[unsafe(method(decameters))]
1611 #[unsafe(method_family = none)]
1612 pub unsafe fn decameters() -> Retained<NSUnitLength>;
1613
1614 #[unsafe(method(meters))]
1615 #[unsafe(method_family = none)]
1616 pub unsafe fn meters() -> Retained<NSUnitLength>;
1617
1618 #[unsafe(method(decimeters))]
1619 #[unsafe(method_family = none)]
1620 pub unsafe fn decimeters() -> Retained<NSUnitLength>;
1621
1622 #[unsafe(method(centimeters))]
1623 #[unsafe(method_family = none)]
1624 pub unsafe fn centimeters() -> Retained<NSUnitLength>;
1625
1626 #[unsafe(method(millimeters))]
1627 #[unsafe(method_family = none)]
1628 pub unsafe fn millimeters() -> Retained<NSUnitLength>;
1629
1630 #[unsafe(method(micrometers))]
1631 #[unsafe(method_family = none)]
1632 pub unsafe fn micrometers() -> Retained<NSUnitLength>;
1633
1634 #[unsafe(method(nanometers))]
1635 #[unsafe(method_family = none)]
1636 pub unsafe fn nanometers() -> Retained<NSUnitLength>;
1637
1638 #[unsafe(method(picometers))]
1639 #[unsafe(method_family = none)]
1640 pub unsafe fn picometers() -> Retained<NSUnitLength>;
1641
1642 #[unsafe(method(inches))]
1643 #[unsafe(method_family = none)]
1644 pub unsafe fn inches() -> Retained<NSUnitLength>;
1645
1646 #[unsafe(method(feet))]
1647 #[unsafe(method_family = none)]
1648 pub unsafe fn feet() -> Retained<NSUnitLength>;
1649
1650 #[unsafe(method(yards))]
1651 #[unsafe(method_family = none)]
1652 pub unsafe fn yards() -> Retained<NSUnitLength>;
1653
1654 #[unsafe(method(miles))]
1655 #[unsafe(method_family = none)]
1656 pub unsafe fn miles() -> Retained<NSUnitLength>;
1657
1658 #[unsafe(method(scandinavianMiles))]
1659 #[unsafe(method_family = none)]
1660 pub unsafe fn scandinavianMiles() -> Retained<NSUnitLength>;
1661
1662 #[unsafe(method(lightyears))]
1663 #[unsafe(method_family = none)]
1664 pub unsafe fn lightyears() -> Retained<NSUnitLength>;
1665
1666 #[unsafe(method(nauticalMiles))]
1667 #[unsafe(method_family = none)]
1668 pub unsafe fn nauticalMiles() -> Retained<NSUnitLength>;
1669
1670 #[unsafe(method(fathoms))]
1671 #[unsafe(method_family = none)]
1672 pub unsafe fn fathoms() -> Retained<NSUnitLength>;
1673
1674 #[unsafe(method(furlongs))]
1675 #[unsafe(method_family = none)]
1676 pub unsafe fn furlongs() -> Retained<NSUnitLength>;
1677
1678 #[unsafe(method(astronomicalUnits))]
1679 #[unsafe(method_family = none)]
1680 pub unsafe fn astronomicalUnits() -> Retained<NSUnitLength>;
1681
1682 #[unsafe(method(parsecs))]
1683 #[unsafe(method_family = none)]
1684 pub unsafe fn parsecs() -> Retained<NSUnitLength>;
1685 );
1686}
1687
1688impl NSUnitLength {
1690 extern_methods!(
1691 #[cfg(feature = "NSString")]
1692 #[unsafe(method(initWithSymbol:converter:))]
1693 #[unsafe(method_family = init)]
1694 pub unsafe fn initWithSymbol_converter(
1695 this: Allocated<Self>,
1696 symbol: &NSString,
1697 converter: &NSUnitConverter,
1698 ) -> Retained<Self>;
1699
1700 #[unsafe(method(baseUnit))]
1701 #[unsafe(method_family = none)]
1702 pub unsafe fn baseUnit() -> Retained<Self>;
1703 );
1704}
1705
1706impl NSUnitLength {
1708 extern_methods!(
1709 #[unsafe(method(init))]
1710 #[unsafe(method_family = init)]
1711 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1712
1713 #[unsafe(method(new))]
1714 #[unsafe(method_family = new)]
1715 pub unsafe fn new() -> Retained<Self>;
1716
1717 #[cfg(feature = "NSString")]
1718 #[unsafe(method(initWithSymbol:))]
1719 #[unsafe(method_family = init)]
1720 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
1721 );
1722}
1723
1724extern_class!(
1725 #[unsafe(super(NSDimension, NSUnit, NSObject))]
1727 #[derive(Debug, PartialEq, Eq, Hash)]
1728 pub struct NSUnitIlluminance;
1729);
1730
1731unsafe impl Send for NSUnitIlluminance {}
1732
1733unsafe impl Sync for NSUnitIlluminance {}
1734
1735#[cfg(feature = "NSObject")]
1736unsafe impl NSCoding for NSUnitIlluminance {}
1737
1738#[cfg(feature = "NSObject")]
1739unsafe impl NSCopying for NSUnitIlluminance {}
1740
1741#[cfg(feature = "NSObject")]
1742unsafe impl CopyingHelper for NSUnitIlluminance {
1743 type Result = Self;
1744}
1745
1746unsafe impl NSObjectProtocol for NSUnitIlluminance {}
1747
1748#[cfg(feature = "NSObject")]
1749unsafe impl NSSecureCoding for NSUnitIlluminance {}
1750
1751impl NSUnitIlluminance {
1752 extern_methods!(
1753 #[unsafe(method(lux))]
1754 #[unsafe(method_family = none)]
1755 pub unsafe fn lux() -> Retained<NSUnitIlluminance>;
1756 );
1757}
1758
1759impl NSUnitIlluminance {
1761 extern_methods!(
1762 #[cfg(feature = "NSString")]
1763 #[unsafe(method(initWithSymbol:converter:))]
1764 #[unsafe(method_family = init)]
1765 pub unsafe fn initWithSymbol_converter(
1766 this: Allocated<Self>,
1767 symbol: &NSString,
1768 converter: &NSUnitConverter,
1769 ) -> Retained<Self>;
1770
1771 #[unsafe(method(baseUnit))]
1772 #[unsafe(method_family = none)]
1773 pub unsafe fn baseUnit() -> Retained<Self>;
1774 );
1775}
1776
1777impl NSUnitIlluminance {
1779 extern_methods!(
1780 #[unsafe(method(init))]
1781 #[unsafe(method_family = init)]
1782 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1783
1784 #[unsafe(method(new))]
1785 #[unsafe(method_family = new)]
1786 pub unsafe fn new() -> Retained<Self>;
1787
1788 #[cfg(feature = "NSString")]
1789 #[unsafe(method(initWithSymbol:))]
1790 #[unsafe(method_family = init)]
1791 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
1792 );
1793}
1794
1795extern_class!(
1796 #[unsafe(super(NSDimension, NSUnit, NSObject))]
1798 #[derive(Debug, PartialEq, Eq, Hash)]
1799 pub struct NSUnitMass;
1800);
1801
1802unsafe impl Send for NSUnitMass {}
1803
1804unsafe impl Sync for NSUnitMass {}
1805
1806#[cfg(feature = "NSObject")]
1807unsafe impl NSCoding for NSUnitMass {}
1808
1809#[cfg(feature = "NSObject")]
1810unsafe impl NSCopying for NSUnitMass {}
1811
1812#[cfg(feature = "NSObject")]
1813unsafe impl CopyingHelper for NSUnitMass {
1814 type Result = Self;
1815}
1816
1817unsafe impl NSObjectProtocol for NSUnitMass {}
1818
1819#[cfg(feature = "NSObject")]
1820unsafe impl NSSecureCoding for NSUnitMass {}
1821
1822impl NSUnitMass {
1823 extern_methods!(
1824 #[unsafe(method(kilograms))]
1825 #[unsafe(method_family = none)]
1826 pub unsafe fn kilograms() -> Retained<NSUnitMass>;
1827
1828 #[unsafe(method(grams))]
1829 #[unsafe(method_family = none)]
1830 pub unsafe fn grams() -> Retained<NSUnitMass>;
1831
1832 #[unsafe(method(decigrams))]
1833 #[unsafe(method_family = none)]
1834 pub unsafe fn decigrams() -> Retained<NSUnitMass>;
1835
1836 #[unsafe(method(centigrams))]
1837 #[unsafe(method_family = none)]
1838 pub unsafe fn centigrams() -> Retained<NSUnitMass>;
1839
1840 #[unsafe(method(milligrams))]
1841 #[unsafe(method_family = none)]
1842 pub unsafe fn milligrams() -> Retained<NSUnitMass>;
1843
1844 #[unsafe(method(micrograms))]
1845 #[unsafe(method_family = none)]
1846 pub unsafe fn micrograms() -> Retained<NSUnitMass>;
1847
1848 #[unsafe(method(nanograms))]
1849 #[unsafe(method_family = none)]
1850 pub unsafe fn nanograms() -> Retained<NSUnitMass>;
1851
1852 #[unsafe(method(picograms))]
1853 #[unsafe(method_family = none)]
1854 pub unsafe fn picograms() -> Retained<NSUnitMass>;
1855
1856 #[unsafe(method(ounces))]
1857 #[unsafe(method_family = none)]
1858 pub unsafe fn ounces() -> Retained<NSUnitMass>;
1859
1860 #[unsafe(method(poundsMass))]
1861 #[unsafe(method_family = none)]
1862 pub unsafe fn poundsMass() -> Retained<NSUnitMass>;
1863
1864 #[unsafe(method(stones))]
1865 #[unsafe(method_family = none)]
1866 pub unsafe fn stones() -> Retained<NSUnitMass>;
1867
1868 #[unsafe(method(metricTons))]
1869 #[unsafe(method_family = none)]
1870 pub unsafe fn metricTons() -> Retained<NSUnitMass>;
1871
1872 #[unsafe(method(shortTons))]
1873 #[unsafe(method_family = none)]
1874 pub unsafe fn shortTons() -> Retained<NSUnitMass>;
1875
1876 #[unsafe(method(carats))]
1877 #[unsafe(method_family = none)]
1878 pub unsafe fn carats() -> Retained<NSUnitMass>;
1879
1880 #[unsafe(method(ouncesTroy))]
1881 #[unsafe(method_family = none)]
1882 pub unsafe fn ouncesTroy() -> Retained<NSUnitMass>;
1883
1884 #[unsafe(method(slugs))]
1885 #[unsafe(method_family = none)]
1886 pub unsafe fn slugs() -> Retained<NSUnitMass>;
1887 );
1888}
1889
1890impl NSUnitMass {
1892 extern_methods!(
1893 #[cfg(feature = "NSString")]
1894 #[unsafe(method(initWithSymbol:converter:))]
1895 #[unsafe(method_family = init)]
1896 pub unsafe fn initWithSymbol_converter(
1897 this: Allocated<Self>,
1898 symbol: &NSString,
1899 converter: &NSUnitConverter,
1900 ) -> Retained<Self>;
1901
1902 #[unsafe(method(baseUnit))]
1903 #[unsafe(method_family = none)]
1904 pub unsafe fn baseUnit() -> Retained<Self>;
1905 );
1906}
1907
1908impl NSUnitMass {
1910 extern_methods!(
1911 #[unsafe(method(init))]
1912 #[unsafe(method_family = init)]
1913 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1914
1915 #[unsafe(method(new))]
1916 #[unsafe(method_family = new)]
1917 pub unsafe fn new() -> Retained<Self>;
1918
1919 #[cfg(feature = "NSString")]
1920 #[unsafe(method(initWithSymbol:))]
1921 #[unsafe(method_family = init)]
1922 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
1923 );
1924}
1925
1926extern_class!(
1927 #[unsafe(super(NSDimension, NSUnit, NSObject))]
1929 #[derive(Debug, PartialEq, Eq, Hash)]
1930 pub struct NSUnitPower;
1931);
1932
1933unsafe impl Send for NSUnitPower {}
1934
1935unsafe impl Sync for NSUnitPower {}
1936
1937#[cfg(feature = "NSObject")]
1938unsafe impl NSCoding for NSUnitPower {}
1939
1940#[cfg(feature = "NSObject")]
1941unsafe impl NSCopying for NSUnitPower {}
1942
1943#[cfg(feature = "NSObject")]
1944unsafe impl CopyingHelper for NSUnitPower {
1945 type Result = Self;
1946}
1947
1948unsafe impl NSObjectProtocol for NSUnitPower {}
1949
1950#[cfg(feature = "NSObject")]
1951unsafe impl NSSecureCoding for NSUnitPower {}
1952
1953impl NSUnitPower {
1954 extern_methods!(
1955 #[unsafe(method(terawatts))]
1956 #[unsafe(method_family = none)]
1957 pub unsafe fn terawatts() -> Retained<NSUnitPower>;
1958
1959 #[unsafe(method(gigawatts))]
1960 #[unsafe(method_family = none)]
1961 pub unsafe fn gigawatts() -> Retained<NSUnitPower>;
1962
1963 #[unsafe(method(megawatts))]
1964 #[unsafe(method_family = none)]
1965 pub unsafe fn megawatts() -> Retained<NSUnitPower>;
1966
1967 #[unsafe(method(kilowatts))]
1968 #[unsafe(method_family = none)]
1969 pub unsafe fn kilowatts() -> Retained<NSUnitPower>;
1970
1971 #[unsafe(method(watts))]
1972 #[unsafe(method_family = none)]
1973 pub unsafe fn watts() -> Retained<NSUnitPower>;
1974
1975 #[unsafe(method(milliwatts))]
1976 #[unsafe(method_family = none)]
1977 pub unsafe fn milliwatts() -> Retained<NSUnitPower>;
1978
1979 #[unsafe(method(microwatts))]
1980 #[unsafe(method_family = none)]
1981 pub unsafe fn microwatts() -> Retained<NSUnitPower>;
1982
1983 #[unsafe(method(nanowatts))]
1984 #[unsafe(method_family = none)]
1985 pub unsafe fn nanowatts() -> Retained<NSUnitPower>;
1986
1987 #[unsafe(method(picowatts))]
1988 #[unsafe(method_family = none)]
1989 pub unsafe fn picowatts() -> Retained<NSUnitPower>;
1990
1991 #[unsafe(method(femtowatts))]
1992 #[unsafe(method_family = none)]
1993 pub unsafe fn femtowatts() -> Retained<NSUnitPower>;
1994
1995 #[unsafe(method(horsepower))]
1996 #[unsafe(method_family = none)]
1997 pub unsafe fn horsepower() -> Retained<NSUnitPower>;
1998 );
1999}
2000
2001impl NSUnitPower {
2003 extern_methods!(
2004 #[cfg(feature = "NSString")]
2005 #[unsafe(method(initWithSymbol:converter:))]
2006 #[unsafe(method_family = init)]
2007 pub unsafe fn initWithSymbol_converter(
2008 this: Allocated<Self>,
2009 symbol: &NSString,
2010 converter: &NSUnitConverter,
2011 ) -> Retained<Self>;
2012
2013 #[unsafe(method(baseUnit))]
2014 #[unsafe(method_family = none)]
2015 pub unsafe fn baseUnit() -> Retained<Self>;
2016 );
2017}
2018
2019impl NSUnitPower {
2021 extern_methods!(
2022 #[unsafe(method(init))]
2023 #[unsafe(method_family = init)]
2024 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2025
2026 #[unsafe(method(new))]
2027 #[unsafe(method_family = new)]
2028 pub unsafe fn new() -> Retained<Self>;
2029
2030 #[cfg(feature = "NSString")]
2031 #[unsafe(method(initWithSymbol:))]
2032 #[unsafe(method_family = init)]
2033 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
2034 );
2035}
2036
2037extern_class!(
2038 #[unsafe(super(NSDimension, NSUnit, NSObject))]
2040 #[derive(Debug, PartialEq, Eq, Hash)]
2041 pub struct NSUnitPressure;
2042);
2043
2044unsafe impl Send for NSUnitPressure {}
2045
2046unsafe impl Sync for NSUnitPressure {}
2047
2048#[cfg(feature = "NSObject")]
2049unsafe impl NSCoding for NSUnitPressure {}
2050
2051#[cfg(feature = "NSObject")]
2052unsafe impl NSCopying for NSUnitPressure {}
2053
2054#[cfg(feature = "NSObject")]
2055unsafe impl CopyingHelper for NSUnitPressure {
2056 type Result = Self;
2057}
2058
2059unsafe impl NSObjectProtocol for NSUnitPressure {}
2060
2061#[cfg(feature = "NSObject")]
2062unsafe impl NSSecureCoding for NSUnitPressure {}
2063
2064impl NSUnitPressure {
2065 extern_methods!(
2066 #[unsafe(method(newtonsPerMetersSquared))]
2067 #[unsafe(method_family = none)]
2068 pub unsafe fn newtonsPerMetersSquared() -> Retained<NSUnitPressure>;
2069
2070 #[unsafe(method(gigapascals))]
2071 #[unsafe(method_family = none)]
2072 pub unsafe fn gigapascals() -> Retained<NSUnitPressure>;
2073
2074 #[unsafe(method(megapascals))]
2075 #[unsafe(method_family = none)]
2076 pub unsafe fn megapascals() -> Retained<NSUnitPressure>;
2077
2078 #[unsafe(method(kilopascals))]
2079 #[unsafe(method_family = none)]
2080 pub unsafe fn kilopascals() -> Retained<NSUnitPressure>;
2081
2082 #[unsafe(method(hectopascals))]
2083 #[unsafe(method_family = none)]
2084 pub unsafe fn hectopascals() -> Retained<NSUnitPressure>;
2085
2086 #[unsafe(method(inchesOfMercury))]
2087 #[unsafe(method_family = none)]
2088 pub unsafe fn inchesOfMercury() -> Retained<NSUnitPressure>;
2089
2090 #[unsafe(method(bars))]
2091 #[unsafe(method_family = none)]
2092 pub unsafe fn bars() -> Retained<NSUnitPressure>;
2093
2094 #[unsafe(method(millibars))]
2095 #[unsafe(method_family = none)]
2096 pub unsafe fn millibars() -> Retained<NSUnitPressure>;
2097
2098 #[unsafe(method(millimetersOfMercury))]
2099 #[unsafe(method_family = none)]
2100 pub unsafe fn millimetersOfMercury() -> Retained<NSUnitPressure>;
2101
2102 #[unsafe(method(poundsForcePerSquareInch))]
2103 #[unsafe(method_family = none)]
2104 pub unsafe fn poundsForcePerSquareInch() -> Retained<NSUnitPressure>;
2105 );
2106}
2107
2108impl NSUnitPressure {
2110 extern_methods!(
2111 #[cfg(feature = "NSString")]
2112 #[unsafe(method(initWithSymbol:converter:))]
2113 #[unsafe(method_family = init)]
2114 pub unsafe fn initWithSymbol_converter(
2115 this: Allocated<Self>,
2116 symbol: &NSString,
2117 converter: &NSUnitConverter,
2118 ) -> Retained<Self>;
2119
2120 #[unsafe(method(baseUnit))]
2121 #[unsafe(method_family = none)]
2122 pub unsafe fn baseUnit() -> Retained<Self>;
2123 );
2124}
2125
2126impl NSUnitPressure {
2128 extern_methods!(
2129 #[unsafe(method(init))]
2130 #[unsafe(method_family = init)]
2131 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2132
2133 #[unsafe(method(new))]
2134 #[unsafe(method_family = new)]
2135 pub unsafe fn new() -> Retained<Self>;
2136
2137 #[cfg(feature = "NSString")]
2138 #[unsafe(method(initWithSymbol:))]
2139 #[unsafe(method_family = init)]
2140 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
2141 );
2142}
2143
2144extern_class!(
2145 #[unsafe(super(NSDimension, NSUnit, NSObject))]
2147 #[derive(Debug, PartialEq, Eq, Hash)]
2148 pub struct NSUnitSpeed;
2149);
2150
2151unsafe impl Send for NSUnitSpeed {}
2152
2153unsafe impl Sync for NSUnitSpeed {}
2154
2155#[cfg(feature = "NSObject")]
2156unsafe impl NSCoding for NSUnitSpeed {}
2157
2158#[cfg(feature = "NSObject")]
2159unsafe impl NSCopying for NSUnitSpeed {}
2160
2161#[cfg(feature = "NSObject")]
2162unsafe impl CopyingHelper for NSUnitSpeed {
2163 type Result = Self;
2164}
2165
2166unsafe impl NSObjectProtocol for NSUnitSpeed {}
2167
2168#[cfg(feature = "NSObject")]
2169unsafe impl NSSecureCoding for NSUnitSpeed {}
2170
2171impl NSUnitSpeed {
2172 extern_methods!(
2173 #[unsafe(method(metersPerSecond))]
2174 #[unsafe(method_family = none)]
2175 pub unsafe fn metersPerSecond() -> Retained<NSUnitSpeed>;
2176
2177 #[unsafe(method(kilometersPerHour))]
2178 #[unsafe(method_family = none)]
2179 pub unsafe fn kilometersPerHour() -> Retained<NSUnitSpeed>;
2180
2181 #[unsafe(method(milesPerHour))]
2182 #[unsafe(method_family = none)]
2183 pub unsafe fn milesPerHour() -> Retained<NSUnitSpeed>;
2184
2185 #[unsafe(method(knots))]
2186 #[unsafe(method_family = none)]
2187 pub unsafe fn knots() -> Retained<NSUnitSpeed>;
2188 );
2189}
2190
2191impl NSUnitSpeed {
2193 extern_methods!(
2194 #[cfg(feature = "NSString")]
2195 #[unsafe(method(initWithSymbol:converter:))]
2196 #[unsafe(method_family = init)]
2197 pub unsafe fn initWithSymbol_converter(
2198 this: Allocated<Self>,
2199 symbol: &NSString,
2200 converter: &NSUnitConverter,
2201 ) -> Retained<Self>;
2202
2203 #[unsafe(method(baseUnit))]
2204 #[unsafe(method_family = none)]
2205 pub unsafe fn baseUnit() -> Retained<Self>;
2206 );
2207}
2208
2209impl NSUnitSpeed {
2211 extern_methods!(
2212 #[unsafe(method(init))]
2213 #[unsafe(method_family = init)]
2214 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2215
2216 #[unsafe(method(new))]
2217 #[unsafe(method_family = new)]
2218 pub unsafe fn new() -> Retained<Self>;
2219
2220 #[cfg(feature = "NSString")]
2221 #[unsafe(method(initWithSymbol:))]
2222 #[unsafe(method_family = init)]
2223 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
2224 );
2225}
2226
2227extern_class!(
2228 #[unsafe(super(NSDimension, NSUnit, NSObject))]
2230 #[derive(Debug, PartialEq, Eq, Hash)]
2231 pub struct NSUnitTemperature;
2232);
2233
2234unsafe impl Send for NSUnitTemperature {}
2235
2236unsafe impl Sync for NSUnitTemperature {}
2237
2238#[cfg(feature = "NSObject")]
2239unsafe impl NSCoding for NSUnitTemperature {}
2240
2241#[cfg(feature = "NSObject")]
2242unsafe impl NSCopying for NSUnitTemperature {}
2243
2244#[cfg(feature = "NSObject")]
2245unsafe impl CopyingHelper for NSUnitTemperature {
2246 type Result = Self;
2247}
2248
2249unsafe impl NSObjectProtocol for NSUnitTemperature {}
2250
2251#[cfg(feature = "NSObject")]
2252unsafe impl NSSecureCoding for NSUnitTemperature {}
2253
2254impl NSUnitTemperature {
2255 extern_methods!(
2256 #[unsafe(method(kelvin))]
2257 #[unsafe(method_family = none)]
2258 pub unsafe fn kelvin() -> Retained<NSUnitTemperature>;
2259
2260 #[unsafe(method(celsius))]
2261 #[unsafe(method_family = none)]
2262 pub unsafe fn celsius() -> Retained<NSUnitTemperature>;
2263
2264 #[unsafe(method(fahrenheit))]
2265 #[unsafe(method_family = none)]
2266 pub unsafe fn fahrenheit() -> Retained<NSUnitTemperature>;
2267 );
2268}
2269
2270impl NSUnitTemperature {
2272 extern_methods!(
2273 #[cfg(feature = "NSString")]
2274 #[unsafe(method(initWithSymbol:converter:))]
2275 #[unsafe(method_family = init)]
2276 pub unsafe fn initWithSymbol_converter(
2277 this: Allocated<Self>,
2278 symbol: &NSString,
2279 converter: &NSUnitConverter,
2280 ) -> Retained<Self>;
2281
2282 #[unsafe(method(baseUnit))]
2283 #[unsafe(method_family = none)]
2284 pub unsafe fn baseUnit() -> Retained<Self>;
2285 );
2286}
2287
2288impl NSUnitTemperature {
2290 extern_methods!(
2291 #[unsafe(method(init))]
2292 #[unsafe(method_family = init)]
2293 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2294
2295 #[unsafe(method(new))]
2296 #[unsafe(method_family = new)]
2297 pub unsafe fn new() -> Retained<Self>;
2298
2299 #[cfg(feature = "NSString")]
2300 #[unsafe(method(initWithSymbol:))]
2301 #[unsafe(method_family = init)]
2302 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
2303 );
2304}
2305
2306extern_class!(
2307 #[unsafe(super(NSDimension, NSUnit, NSObject))]
2309 #[derive(Debug, PartialEq, Eq, Hash)]
2310 pub struct NSUnitVolume;
2311);
2312
2313unsafe impl Send for NSUnitVolume {}
2314
2315unsafe impl Sync for NSUnitVolume {}
2316
2317#[cfg(feature = "NSObject")]
2318unsafe impl NSCoding for NSUnitVolume {}
2319
2320#[cfg(feature = "NSObject")]
2321unsafe impl NSCopying for NSUnitVolume {}
2322
2323#[cfg(feature = "NSObject")]
2324unsafe impl CopyingHelper for NSUnitVolume {
2325 type Result = Self;
2326}
2327
2328unsafe impl NSObjectProtocol for NSUnitVolume {}
2329
2330#[cfg(feature = "NSObject")]
2331unsafe impl NSSecureCoding for NSUnitVolume {}
2332
2333impl NSUnitVolume {
2334 extern_methods!(
2335 #[unsafe(method(megaliters))]
2336 #[unsafe(method_family = none)]
2337 pub unsafe fn megaliters() -> Retained<NSUnitVolume>;
2338
2339 #[unsafe(method(kiloliters))]
2340 #[unsafe(method_family = none)]
2341 pub unsafe fn kiloliters() -> Retained<NSUnitVolume>;
2342
2343 #[unsafe(method(liters))]
2344 #[unsafe(method_family = none)]
2345 pub unsafe fn liters() -> Retained<NSUnitVolume>;
2346
2347 #[unsafe(method(deciliters))]
2348 #[unsafe(method_family = none)]
2349 pub unsafe fn deciliters() -> Retained<NSUnitVolume>;
2350
2351 #[unsafe(method(centiliters))]
2352 #[unsafe(method_family = none)]
2353 pub unsafe fn centiliters() -> Retained<NSUnitVolume>;
2354
2355 #[unsafe(method(milliliters))]
2356 #[unsafe(method_family = none)]
2357 pub unsafe fn milliliters() -> Retained<NSUnitVolume>;
2358
2359 #[unsafe(method(cubicKilometers))]
2360 #[unsafe(method_family = none)]
2361 pub unsafe fn cubicKilometers() -> Retained<NSUnitVolume>;
2362
2363 #[unsafe(method(cubicMeters))]
2364 #[unsafe(method_family = none)]
2365 pub unsafe fn cubicMeters() -> Retained<NSUnitVolume>;
2366
2367 #[unsafe(method(cubicDecimeters))]
2368 #[unsafe(method_family = none)]
2369 pub unsafe fn cubicDecimeters() -> Retained<NSUnitVolume>;
2370
2371 #[unsafe(method(cubicCentimeters))]
2372 #[unsafe(method_family = none)]
2373 pub unsafe fn cubicCentimeters() -> Retained<NSUnitVolume>;
2374
2375 #[unsafe(method(cubicMillimeters))]
2376 #[unsafe(method_family = none)]
2377 pub unsafe fn cubicMillimeters() -> Retained<NSUnitVolume>;
2378
2379 #[unsafe(method(cubicInches))]
2380 #[unsafe(method_family = none)]
2381 pub unsafe fn cubicInches() -> Retained<NSUnitVolume>;
2382
2383 #[unsafe(method(cubicFeet))]
2384 #[unsafe(method_family = none)]
2385 pub unsafe fn cubicFeet() -> Retained<NSUnitVolume>;
2386
2387 #[unsafe(method(cubicYards))]
2388 #[unsafe(method_family = none)]
2389 pub unsafe fn cubicYards() -> Retained<NSUnitVolume>;
2390
2391 #[unsafe(method(cubicMiles))]
2392 #[unsafe(method_family = none)]
2393 pub unsafe fn cubicMiles() -> Retained<NSUnitVolume>;
2394
2395 #[unsafe(method(acreFeet))]
2396 #[unsafe(method_family = none)]
2397 pub unsafe fn acreFeet() -> Retained<NSUnitVolume>;
2398
2399 #[unsafe(method(bushels))]
2400 #[unsafe(method_family = none)]
2401 pub unsafe fn bushels() -> Retained<NSUnitVolume>;
2402
2403 #[unsafe(method(teaspoons))]
2404 #[unsafe(method_family = none)]
2405 pub unsafe fn teaspoons() -> Retained<NSUnitVolume>;
2406
2407 #[unsafe(method(tablespoons))]
2408 #[unsafe(method_family = none)]
2409 pub unsafe fn tablespoons() -> Retained<NSUnitVolume>;
2410
2411 #[unsafe(method(fluidOunces))]
2412 #[unsafe(method_family = none)]
2413 pub unsafe fn fluidOunces() -> Retained<NSUnitVolume>;
2414
2415 #[unsafe(method(cups))]
2416 #[unsafe(method_family = none)]
2417 pub unsafe fn cups() -> Retained<NSUnitVolume>;
2418
2419 #[unsafe(method(pints))]
2420 #[unsafe(method_family = none)]
2421 pub unsafe fn pints() -> Retained<NSUnitVolume>;
2422
2423 #[unsafe(method(quarts))]
2424 #[unsafe(method_family = none)]
2425 pub unsafe fn quarts() -> Retained<NSUnitVolume>;
2426
2427 #[unsafe(method(gallons))]
2428 #[unsafe(method_family = none)]
2429 pub unsafe fn gallons() -> Retained<NSUnitVolume>;
2430
2431 #[unsafe(method(imperialTeaspoons))]
2432 #[unsafe(method_family = none)]
2433 pub unsafe fn imperialTeaspoons() -> Retained<NSUnitVolume>;
2434
2435 #[unsafe(method(imperialTablespoons))]
2436 #[unsafe(method_family = none)]
2437 pub unsafe fn imperialTablespoons() -> Retained<NSUnitVolume>;
2438
2439 #[unsafe(method(imperialFluidOunces))]
2440 #[unsafe(method_family = none)]
2441 pub unsafe fn imperialFluidOunces() -> Retained<NSUnitVolume>;
2442
2443 #[unsafe(method(imperialPints))]
2444 #[unsafe(method_family = none)]
2445 pub unsafe fn imperialPints() -> Retained<NSUnitVolume>;
2446
2447 #[unsafe(method(imperialQuarts))]
2448 #[unsafe(method_family = none)]
2449 pub unsafe fn imperialQuarts() -> Retained<NSUnitVolume>;
2450
2451 #[unsafe(method(imperialGallons))]
2452 #[unsafe(method_family = none)]
2453 pub unsafe fn imperialGallons() -> Retained<NSUnitVolume>;
2454
2455 #[unsafe(method(metricCups))]
2456 #[unsafe(method_family = none)]
2457 pub unsafe fn metricCups() -> Retained<NSUnitVolume>;
2458 );
2459}
2460
2461impl NSUnitVolume {
2463 extern_methods!(
2464 #[cfg(feature = "NSString")]
2465 #[unsafe(method(initWithSymbol:converter:))]
2466 #[unsafe(method_family = init)]
2467 pub unsafe fn initWithSymbol_converter(
2468 this: Allocated<Self>,
2469 symbol: &NSString,
2470 converter: &NSUnitConverter,
2471 ) -> Retained<Self>;
2472
2473 #[unsafe(method(baseUnit))]
2474 #[unsafe(method_family = none)]
2475 pub unsafe fn baseUnit() -> Retained<Self>;
2476 );
2477}
2478
2479impl NSUnitVolume {
2481 extern_methods!(
2482 #[unsafe(method(init))]
2483 #[unsafe(method_family = init)]
2484 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2485
2486 #[unsafe(method(new))]
2487 #[unsafe(method_family = new)]
2488 pub unsafe fn new() -> Retained<Self>;
2489
2490 #[cfg(feature = "NSString")]
2491 #[unsafe(method(initWithSymbol:))]
2492 #[unsafe(method_family = init)]
2493 pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
2494 );
2495}