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")]
20extern_conformance!(
21    unsafe impl NSCoding for MXAppResponsivenessMetric {}
22);
23
24#[cfg(feature = "MXMetric")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for MXAppResponsivenessMetric {}
27);
28
29#[cfg(feature = "MXMetric")]
30extern_conformance!(
31    unsafe impl NSSecureCoding for MXAppResponsivenessMetric {}
32);
33
34#[cfg(feature = "MXMetric")]
35impl MXAppResponsivenessMetric {
36    extern_methods!(
37        #[cfg(feature = "MXHistogram")]
38        /// Histogrammed app hang time data.
39        ///
40        /// Applications are considered to be "hanging" when they are unable to handle user input responsively.
41        ///
42        /// The durations for periods of hangs will be reported in the histogram returned here.
43        ///
44        /// Application hang times that exceeds 9 seconds of wall clock time are reported in the final bucket of the histogram.
45        ///
46        /// Dimensioned as NSUnitDuration.
47        #[unsafe(method(histogrammedApplicationHangTime))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn histogrammedApplicationHangTime(
50            &self,
51        ) -> Retained<MXHistogram<NSUnitDuration>>;
52    );
53}
54
55/// Methods declared on superclass `NSObject`.
56#[cfg(feature = "MXMetric")]
57impl MXAppResponsivenessMetric {
58    extern_methods!(
59        #[unsafe(method(init))]
60        #[unsafe(method_family = init)]
61        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
62
63        #[unsafe(method(new))]
64        #[unsafe(method_family = new)]
65        pub unsafe fn new() -> Retained<Self>;
66    );
67}