objc2_home_kit/generated/
HMNumberRange.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// This class describes a range of numbers: [min, max]
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmnumberrange?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct HMNumberRange;
16);
17
18unsafe impl Send for HMNumberRange {}
19
20unsafe impl Sync for HMNumberRange {}
21
22extern_conformance!(
23    unsafe impl NSObjectProtocol for HMNumberRange {}
24);
25
26impl HMNumberRange {
27    extern_methods!(
28        #[unsafe(method(init))]
29        #[unsafe(method_family = init)]
30        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
31
32        /// Initializes a new range of numbers
33        ///
34        ///
35        /// Parameter `minValue`: The minimum value of the range.
36        ///
37        ///
38        /// Parameter `maxValue`: The maximum value of the range.
39        #[unsafe(method(numberRangeWithMinValue:maxValue:))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn numberRangeWithMinValue_maxValue(
42            min_value: &NSNumber,
43            max_value: &NSNumber,
44        ) -> Retained<Self>;
45
46        /// Initializes a new range of numbers. The maximum value is set to a large value.
47        ///
48        ///
49        /// Parameter `minValue`: The minimum value of the range.
50        #[unsafe(method(numberRangeWithMinValue:))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn numberRangeWithMinValue(min_value: &NSNumber) -> Retained<Self>;
53
54        /// Initializes a new range of numbers. The minimum value is set to a small value.
55        ///
56        ///
57        /// Parameter `maxValue`: The maximum value of the range.
58        #[unsafe(method(numberRangeWithMaxValue:))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn numberRangeWithMaxValue(max_value: &NSNumber) -> Retained<Self>;
61
62        /// The minimum value of the range.
63        ///
64        /// This property is not atomic.
65        ///
66        /// # Safety
67        ///
68        /// This might not be thread-safe.
69        #[unsafe(method(minValue))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn minValue(&self) -> Option<Retained<NSNumber>>;
72
73        /// The maximum value of the range.
74        ///
75        /// This property is not atomic.
76        ///
77        /// # Safety
78        ///
79        /// This might not be thread-safe.
80        #[unsafe(method(maxValue))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn maxValue(&self) -> Option<Retained<NSNumber>>;
83    );
84}
85
86/// Methods declared on superclass `NSObject`.
87impl HMNumberRange {
88    extern_methods!(
89        #[unsafe(method(new))]
90        #[unsafe(method_family = new)]
91        pub unsafe fn new() -> Retained<Self>;
92    );
93}