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