objc2_health_kit/generated/
HKQuantity.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct HKQuantity;
17);
18
19unsafe impl Send for HKQuantity {}
20
21unsafe impl Sync for HKQuantity {}
22
23extern_conformance!(
24 unsafe impl NSCoding for HKQuantity {}
25);
26
27extern_conformance!(
28 unsafe impl NSCopying for HKQuantity {}
29);
30
31unsafe impl CopyingHelper for HKQuantity {
32 type Result = Self;
33}
34
35extern_conformance!(
36 unsafe impl NSObjectProtocol for HKQuantity {}
37);
38
39extern_conformance!(
40 unsafe impl NSSecureCoding for HKQuantity {}
41);
42
43impl HKQuantity {
44 extern_methods!(
45 #[unsafe(method(init))]
46 #[unsafe(method_family = init)]
47 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
48
49 #[cfg(feature = "HKUnit")]
50 #[unsafe(method(quantityWithUnit:doubleValue:))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn quantityWithUnit_doubleValue(
54 unit: &HKUnit,
55 value: c_double,
56 ) -> Retained<Self>;
57
58 #[cfg(feature = "HKUnit")]
59 #[unsafe(method(isCompatibleWithUnit:))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn isCompatibleWithUnit(&self, unit: &HKUnit) -> bool;
63
64 #[cfg(feature = "HKUnit")]
65 #[unsafe(method(doubleValueForUnit:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn doubleValueForUnit(&self, unit: &HKUnit) -> c_double;
71
72 #[unsafe(method(compare:))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn compare(&self, quantity: &HKQuantity) -> NSComparisonResult;
79 );
80}
81
82impl HKQuantity {
84 extern_methods!(
85 #[unsafe(method(new))]
86 #[unsafe(method_family = new)]
87 pub unsafe fn new() -> Retained<Self>;
88 );
89}