objc2_shazam_kit/generated/
SHRange.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    /// A half-open interval from a lower bound up to, but not including, an upper bound.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/shazamkit/shrange?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct SHRange;
17);
18
19unsafe impl Send for SHRange {}
20
21unsafe impl Sync for SHRange {}
22
23extern_conformance!(
24    unsafe impl NSCoding for SHRange {}
25);
26
27extern_conformance!(
28    unsafe impl NSCopying for SHRange {}
29);
30
31unsafe impl CopyingHelper for SHRange {
32    type Result = Self;
33}
34
35extern_conformance!(
36    unsafe impl NSObjectProtocol for SHRange {}
37);
38
39extern_conformance!(
40    unsafe impl NSSecureCoding for SHRange {}
41);
42
43impl SHRange {
44    extern_methods!(
45        /// The lowerBound of this time range
46        #[unsafe(method(lowerBound))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn lowerBound(&self) -> c_double;
49
50        /// The range's upper bound.
51        #[unsafe(method(upperBound))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn upperBound(&self) -> c_double;
54
55        /// Creates a range with the bounds you specify.
56        ///
57        /// - Parameters:
58        /// - lowerBound: The lower bound of the range.
59        /// - upperBound: The upper bound of the range.
60        #[unsafe(method(rangeWithLowerBound:upperBound:))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn rangeWithLowerBound_upperBound(
63            lower_bound: c_double,
64            upper_bound: c_double,
65        ) -> Retained<Self>;
66
67        /// Creates a range with the bounds you specify.
68        ///
69        /// - Parameters:
70        /// - lowerBound: The lower bound of the range.
71        /// - upperBound: The upper bound of the range.
72        #[unsafe(method(initWithLowerBound:upperBound:))]
73        #[unsafe(method_family = init)]
74        pub unsafe fn initWithLowerBound_upperBound(
75            this: Allocated<Self>,
76            lower_bound: c_double,
77            upper_bound: c_double,
78        ) -> Retained<Self>;
79
80        #[unsafe(method(init))]
81        #[unsafe(method_family = init)]
82        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84        #[unsafe(method(new))]
85        #[unsafe(method_family = new)]
86        pub unsafe fn new() -> Retained<Self>;
87    );
88}