objc2_health_kit/generated/
HKCorrelationQuery.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))]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 #[cfg(feature = "HKQuery")]
21 pub struct HKCorrelationQuery;
22);
23
24#[cfg(feature = "HKQuery")]
25unsafe impl Send for HKCorrelationQuery {}
26
27#[cfg(feature = "HKQuery")]
28unsafe impl Sync for HKCorrelationQuery {}
29
30#[cfg(feature = "HKQuery")]
31extern_conformance!(
32 unsafe impl NSObjectProtocol for HKCorrelationQuery {}
33);
34
35#[cfg(feature = "HKQuery")]
36impl HKCorrelationQuery {
37 extern_methods!(
38 #[cfg(feature = "HKObjectType")]
39 #[unsafe(method(correlationType))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn correlationType(&self) -> Retained<HKCorrelationType>;
42
43 #[cfg(feature = "HKObjectType")]
44 #[unsafe(method(samplePredicates))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn samplePredicates(
51 &self,
52 ) -> Option<Retained<NSDictionary<HKSampleType, NSPredicate>>>;
53
54 #[cfg(all(
55 feature = "HKCorrelation",
56 feature = "HKObject",
57 feature = "HKObjectType",
58 feature = "HKSample",
59 feature = "block2"
60 ))]
61 #[unsafe(method(initWithType:predicate:samplePredicates:completion:))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn initWithType_predicate_samplePredicates_completion(
80 this: Allocated<Self>,
81 correlation_type: &HKCorrelationType,
82 predicate: Option<&NSPredicate>,
83 sample_predicates: Option<&NSDictionary<HKSampleType, NSPredicate>>,
84 completion: &block2::DynBlock<
85 dyn Fn(NonNull<HKCorrelationQuery>, *mut NSArray<HKCorrelation>, *mut NSError),
86 >,
87 ) -> Retained<Self>;
88 );
89}
90
91#[cfg(feature = "HKQuery")]
93impl HKCorrelationQuery {
94 extern_methods!(
95 #[unsafe(method(init))]
96 #[unsafe(method_family = init)]
97 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
98 );
99}
100
101#[cfg(feature = "HKQuery")]
103impl HKCorrelationQuery {
104 extern_methods!(
105 #[unsafe(method(new))]
106 #[unsafe(method_family = new)]
107 pub unsafe fn new() -> Retained<Self>;
108 );
109}