objc2_health_kit/generated/
HKStatisticsQuery.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkstatisticsquery?language=objc)
12    #[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        /// # Safety
34        ///
35        /// `handler` block must be sendable.
36        #[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/// Methods declared on superclass `HKQuery`.
51#[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/// Methods declared on superclass `NSObject`.
61#[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}