objc2_metric_kit/generated/
MXAppLaunchMetric.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 launch metrics.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxapplaunchmetric?language=objc)
13    #[unsafe(super(MXMetric, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "MXMetric")]
16    pub struct MXAppLaunchMetric;
17);
18
19#[cfg(feature = "MXMetric")]
20unsafe impl NSCoding for MXAppLaunchMetric {}
21
22#[cfg(feature = "MXMetric")]
23unsafe impl NSObjectProtocol for MXAppLaunchMetric {}
24
25#[cfg(feature = "MXMetric")]
26unsafe impl NSSecureCoding for MXAppLaunchMetric {}
27
28#[cfg(feature = "MXMetric")]
29impl MXAppLaunchMetric {
30    extern_methods!(
31        #[cfg(feature = "MXHistogram")]
32        /// Histogrammed application time-to-first-draw data.
33        ///
34        /// Dimensioned as NSUnitDuration.
35        ///
36        /// This represents the time when the first CA commit is finished.
37        #[unsafe(method(histogrammedTimeToFirstDraw))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn histogrammedTimeToFirstDraw(&self) -> Retained<MXHistogram<NSUnitDuration>>;
40
41        #[cfg(feature = "MXHistogram")]
42        /// Histogrammed application resume time data.
43        ///
44        /// Dimensioned as NSUnitDuration.
45        #[unsafe(method(histogrammedApplicationResumeTime))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn histogrammedApplicationResumeTime(
48            &self,
49        ) -> Retained<MXHistogram<NSUnitDuration>>;
50
51        #[cfg(feature = "MXHistogram")]
52        /// Histogrammed optimized application time-to-first-draw data.
53        ///
54        /// Dimensioned as NSUnitDuration.
55        ///
56        /// This represents the time when the first CA commit is finished where the application launch has been optimized by the system.
57        ///
58        /// In iOS 15, the system will opportunistically start applications that are not running in the background to reduce the amount of time a user may have to wait before an application is usable. These launches can occur after a system reboot and periodically as system conditions allow.
59        #[unsafe(method(histogrammedOptimizedTimeToFirstDraw))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn histogrammedOptimizedTimeToFirstDraw(
62            &self,
63        ) -> Retained<MXHistogram<NSUnitDuration>>;
64
65        #[cfg(feature = "MXHistogram")]
66        /// Histogrammed extended launch data.
67        ///
68        /// Dimensioned as NSUnitDuration.
69        ///
70        /// This represents the time when the app has drawn the first frame and finishes all extended launch tasks that assigned by the developer.
71        #[unsafe(method(histogrammedExtendedLaunch))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn histogrammedExtendedLaunch(&self) -> Retained<MXHistogram<NSUnitDuration>>;
74    );
75}
76
77/// Methods declared on superclass `NSObject`.
78#[cfg(feature = "MXMetric")]
79impl MXAppLaunchMetric {
80    extern_methods!(
81        #[unsafe(method(init))]
82        #[unsafe(method_family = init)]
83        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
84
85        #[unsafe(method(new))]
86        #[unsafe(method_family = new)]
87        pub unsafe fn new() -> Retained<Self>;
88    );
89}