1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// Defines the range within which an ear's sensitivity point may have been clamped, if any.
///
/// At times, it may be required to indicate that a sensitivity point has been clamped to a range. These reasons include but
/// are not limited to user safety, hardware limitations, or algorithm features.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkaudiogramsensitivitypointclampingrange?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct HKAudiogramSensitivityPointClampingRange;
);
unsafe impl Send for HKAudiogramSensitivityPointClampingRange {}
unsafe impl Sync for HKAudiogramSensitivityPointClampingRange {}
extern_conformance!(
unsafe impl NSCoding for HKAudiogramSensitivityPointClampingRange {}
);
extern_conformance!(
unsafe impl NSCopying for HKAudiogramSensitivityPointClampingRange {}
);
unsafe impl CopyingHelper for HKAudiogramSensitivityPointClampingRange {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for HKAudiogramSensitivityPointClampingRange {}
);
extern_conformance!(
unsafe impl NSSecureCoding for HKAudiogramSensitivityPointClampingRange {}
);
impl HKAudiogramSensitivityPointClampingRange {
extern_methods!(
#[cfg(feature = "HKQuantity")]
/// The lower bound of the clamping range, if any, in dBHL.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(lowerBound))]
#[unsafe(method_family = none)]
pub unsafe fn lowerBound(&self) -> Option<Retained<HKQuantity>>;
#[cfg(feature = "HKQuantity")]
/// The upper bound of the clamping range, if any, in dBHL.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(upperBound))]
#[unsafe(method_family = none)]
pub unsafe fn upperBound(&self) -> Option<Retained<HKQuantity>>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
/// Creates a clamping range from a given lower and upper bound. At least one bound must be specified. If both bounds are provided, the lower bound must be less than the upper bound.
///
/// Parameter `lowerBound`: The lower bound of the clamping range (if any)
///
/// Parameter `upperBound`: The upper bound of the clamping range (if any)
///
/// Parameter `errorOut`: If there was a problem creating this instance this will contain the error.
///
/// Returns: New instance of a clamping range or nil if there were problems
/// creating the instance. Errors may include not having any bound or lower bound is greater than the upper bound
#[unsafe(method(clampingRangeWithLowerBound:upperBound:error:_))]
#[unsafe(method_family = none)]
pub unsafe fn clampingRangeWithLowerBound_upperBound_error(
lower_bound: Option<&NSNumber>,
upper_bound: Option<&NSNumber>,
) -> Result<Retained<Self>, Retained<NSError>>;
);
}
/// Methods declared on superclass `NSObject`.
impl HKAudiogramSensitivityPointClampingRange {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}