objc2_metric_kit/generated/
MXAppResponsivenessMetric.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    /// An MXMetric subclass that encapsulates app responsiveness metrics.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxappresponsivenessmetric?language=objc)
13    #[unsafe(super(MXMetric, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "MXMetric")]
16    pub struct MXAppResponsivenessMetric;
17);
18
19#[cfg(feature = "MXMetric")]
20unsafe impl NSCoding for MXAppResponsivenessMetric {}
21
22#[cfg(feature = "MXMetric")]
23unsafe impl NSObjectProtocol for MXAppResponsivenessMetric {}
24
25#[cfg(feature = "MXMetric")]
26unsafe impl NSSecureCoding for MXAppResponsivenessMetric {}
27
28#[cfg(feature = "MXMetric")]
29impl MXAppResponsivenessMetric {
30    extern_methods!(
31        #[cfg(feature = "MXHistogram")]
32        /// Histogrammed app hang time data.
33        ///
34        /// Applications are considered to be "hanging" when they are unable to handle user input responsively.
35        ///
36        /// The durations for periods of hangs will be reported in the histogram returned here.
37        ///
38        /// Application hang times that exceeds 9 seconds of wall clock time are reported in the final bucket of the histogram.
39        ///
40        /// Dimensioned as NSUnitDuration.
41        #[unsafe(method(histogrammedApplicationHangTime))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn histogrammedApplicationHangTime(
44            &self,
45        ) -> Retained<MXHistogram<NSUnitDuration>>;
46    );
47}
48
49/// Methods declared on superclass `NSObject`.
50#[cfg(feature = "MXMetric")]
51impl MXAppResponsivenessMetric {
52    extern_methods!(
53        #[unsafe(method(init))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
56
57        #[unsafe(method(new))]
58        #[unsafe(method_family = new)]
59        pub unsafe fn new() -> Retained<Self>;
60    );
61}