objc2_health_kit/generated/
HKStatisticsQuery.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(HKQuery, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "HKQuery")]
15 pub struct HKStatisticsQuery;
16);
17
18#[cfg(feature = "HKQuery")]
19unsafe impl Send for HKStatisticsQuery {}
20
21#[cfg(feature = "HKQuery")]
22unsafe impl Sync for HKStatisticsQuery {}
23
24#[cfg(feature = "HKQuery")]
25extern_conformance!(
26 unsafe impl NSObjectProtocol for HKStatisticsQuery {}
27);
28
29#[cfg(feature = "HKQuery")]
30impl HKStatisticsQuery {
31 extern_methods!(
32 #[cfg(all(feature = "HKObjectType", feature = "HKStatistics", feature = "block2"))]
33 #[unsafe(method(initWithQuantityType:quantitySamplePredicate:options:completionHandler:))]
37 #[unsafe(method_family = init)]
38 pub unsafe fn initWithQuantityType_quantitySamplePredicate_options_completionHandler(
39 this: Allocated<Self>,
40 quantity_type: &HKQuantityType,
41 quantity_sample_predicate: Option<&NSPredicate>,
42 options: HKStatisticsOptions,
43 handler: &block2::DynBlock<
44 dyn Fn(NonNull<HKStatisticsQuery>, *mut HKStatistics, *mut NSError),
45 >,
46 ) -> Retained<Self>;
47 );
48}
49
50#[cfg(feature = "HKQuery")]
52impl HKStatisticsQuery {
53 extern_methods!(
54 #[unsafe(method(init))]
55 #[unsafe(method_family = init)]
56 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
57 );
58}
59
60#[cfg(feature = "HKQuery")]
62impl HKStatisticsQuery {
63 extern_methods!(
64 #[unsafe(method(new))]
65 #[unsafe(method_family = new)]
66 pub unsafe fn new() -> Retained<Self>;
67 );
68}