objc2_health_kit/generated/
HKElectrocardiogramQuery.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct HKElectrocardiogramVoltageMeasurement;
19);
20
21unsafe impl Send for HKElectrocardiogramVoltageMeasurement {}
22
23unsafe impl Sync for HKElectrocardiogramVoltageMeasurement {}
24
25extern_conformance!(
26 unsafe impl NSCopying for HKElectrocardiogramVoltageMeasurement {}
27);
28
29unsafe impl CopyingHelper for HKElectrocardiogramVoltageMeasurement {
30 type Result = Self;
31}
32
33extern_conformance!(
34 unsafe impl NSObjectProtocol for HKElectrocardiogramVoltageMeasurement {}
35);
36
37impl HKElectrocardiogramVoltageMeasurement {
38 extern_methods!(
39 #[unsafe(method(timeSinceSampleStart))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn timeSinceSampleStart(&self) -> NSTimeInterval;
49
50 #[cfg(all(feature = "HKElectrocardiogram", feature = "HKQuantity"))]
51 #[unsafe(method(quantityForLead:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn quantityForLead(
57 &self,
58 lead: HKElectrocardiogramLead,
59 ) -> Option<Retained<HKQuantity>>;
60 );
61}
62
63impl HKElectrocardiogramVoltageMeasurement {
65 extern_methods!(
66 #[unsafe(method(init))]
67 #[unsafe(method_family = init)]
68 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
69
70 #[unsafe(method(new))]
71 #[unsafe(method_family = new)]
72 pub unsafe fn new() -> Retained<Self>;
73 );
74}
75
76extern_class!(
77 #[unsafe(super(HKQuery, NSObject))]
79 #[derive(Debug, PartialEq, Eq, Hash)]
80 #[cfg(feature = "HKQuery")]
81 pub struct HKElectrocardiogramQuery;
82);
83
84#[cfg(feature = "HKQuery")]
85unsafe impl Send for HKElectrocardiogramQuery {}
86
87#[cfg(feature = "HKQuery")]
88unsafe impl Sync for HKElectrocardiogramQuery {}
89
90#[cfg(feature = "HKQuery")]
91extern_conformance!(
92 unsafe impl NSObjectProtocol for HKElectrocardiogramQuery {}
93);
94
95#[cfg(feature = "HKQuery")]
96impl HKElectrocardiogramQuery {
97 extern_methods!(
98 #[cfg(all(
99 feature = "HKElectrocardiogram",
100 feature = "HKObject",
101 feature = "HKSample",
102 feature = "block2"
103 ))]
104 #[unsafe(method(initWithElectrocardiogram:dataHandler:))]
112 #[unsafe(method_family = init)]
113 pub unsafe fn initWithElectrocardiogram_dataHandler(
114 this: Allocated<Self>,
115 electrocardiogram: &HKElectrocardiogram,
116 data_handler: &block2::DynBlock<
117 dyn Fn(
118 NonNull<HKElectrocardiogramQuery>,
119 *mut HKElectrocardiogramVoltageMeasurement,
120 Bool,
121 *mut NSError,
122 ),
123 >,
124 ) -> Retained<Self>;
125 );
126}
127
128#[cfg(feature = "HKQuery")]
130impl HKElectrocardiogramQuery {
131 extern_methods!(
132 #[unsafe(method(init))]
133 #[unsafe(method_family = init)]
134 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
135 );
136}
137
138#[cfg(feature = "HKQuery")]
140impl HKElectrocardiogramQuery {
141 extern_methods!(
142 #[unsafe(method(new))]
143 #[unsafe(method_family = new)]
144 pub unsafe fn new() -> Retained<Self>;
145 );
146}