objc2_health_kit/generated/
HKUserAnnotatedMedicationQuery.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/hkuserannotatedmedicationquery?language=objc)
12    #[unsafe(super(HKQuery, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "HKQuery")]
15    pub struct HKUserAnnotatedMedicationQuery;
16);
17
18#[cfg(feature = "HKQuery")]
19unsafe impl Send for HKUserAnnotatedMedicationQuery {}
20
21#[cfg(feature = "HKQuery")]
22unsafe impl Sync for HKUserAnnotatedMedicationQuery {}
23
24#[cfg(feature = "HKQuery")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for HKUserAnnotatedMedicationQuery {}
27);
28
29#[cfg(feature = "HKQuery")]
30impl HKUserAnnotatedMedicationQuery {
31    extern_methods!(
32        #[cfg(all(feature = "HKUserAnnotatedMedication", feature = "block2"))]
33        /// Returns a query that will retrieve HKUserAnnotatedMedications matching the given predicate and limit.
34        ///
35        /// Parameter `predicate`: The predicate which user annotated medications should match.
36        ///
37        /// Parameter `limit`: The maximum number of  user annotated medications to return.  Pass HKObjectQueryNoLimit for no limit.
38        ///
39        /// Parameter `resultsHandler`: The block to invoke with results to deliver to the client. The results handler will be called with done = YES when there are no more user annotated medications to enumerate.
40        #[unsafe(method(initWithPredicate:limit:resultsHandler:))]
41        #[unsafe(method_family = init)]
42        pub unsafe fn initWithPredicate_limit_resultsHandler(
43            this: Allocated<Self>,
44            predicate: Option<&NSPredicate>,
45            limit: NSUInteger,
46            results_handler: &block2::DynBlock<
47                dyn Fn(
48                    NonNull<HKUserAnnotatedMedicationQuery>,
49                    *mut HKUserAnnotatedMedication,
50                    Bool,
51                    *mut NSError,
52                ),
53            >,
54        ) -> Retained<Self>;
55    );
56}
57
58/// Methods declared on superclass `HKQuery`.
59#[cfg(feature = "HKQuery")]
60impl HKUserAnnotatedMedicationQuery {
61    extern_methods!(
62        #[unsafe(method(init))]
63        #[unsafe(method_family = init)]
64        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
65    );
66}
67
68/// Methods declared on superclass `NSObject`.
69#[cfg(feature = "HKQuery")]
70impl HKUserAnnotatedMedicationQuery {
71    extern_methods!(
72        #[unsafe(method(new))]
73        #[unsafe(method_family = new)]
74        pub unsafe fn new() -> Retained<Self>;
75    );
76}