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")]
20extern_conformance!(
21    unsafe impl NSCoding for MXAppLaunchMetric {}
22);
23
24#[cfg(feature = "MXMetric")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for MXAppLaunchMetric {}
27);
28
29#[cfg(feature = "MXMetric")]
30extern_conformance!(
31    unsafe impl NSSecureCoding for MXAppLaunchMetric {}
32);
33
34#[cfg(feature = "MXMetric")]
35impl MXAppLaunchMetric {
36    extern_methods!(
37        #[cfg(feature = "MXHistogram")]
38        /// Histogrammed application time-to-first-draw data.
39        ///
40        /// Dimensioned as NSUnitDuration.
41        ///
42        /// This represents the time when the first CA commit is finished.
43        #[unsafe(method(histogrammedTimeToFirstDraw))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn histogrammedTimeToFirstDraw(&self) -> Retained<MXHistogram<NSUnitDuration>>;
46
47        #[cfg(feature = "MXHistogram")]
48        /// Histogrammed application resume time data.
49        ///
50        /// Dimensioned as NSUnitDuration.
51        #[unsafe(method(histogrammedApplicationResumeTime))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn histogrammedApplicationResumeTime(
54            &self,
55        ) -> Retained<MXHistogram<NSUnitDuration>>;
56
57        #[cfg(feature = "MXHistogram")]
58        /// Histogrammed optimized application time-to-first-draw data.
59        ///
60        /// Dimensioned as NSUnitDuration.
61        ///
62        /// This represents the time when the first CA commit is finished where the application launch has been optimized by the system.
63        ///
64        /// 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.
65        #[unsafe(method(histogrammedOptimizedTimeToFirstDraw))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn histogrammedOptimizedTimeToFirstDraw(
68            &self,
69        ) -> Retained<MXHistogram<NSUnitDuration>>;
70
71        #[cfg(feature = "MXHistogram")]
72        /// Histogrammed extended launch data.
73        ///
74        /// Dimensioned as NSUnitDuration.
75        ///
76        /// This represents the time when the app has drawn the first frame and finishes all extended launch tasks that assigned by the developer.
77        #[unsafe(method(histogrammedExtendedLaunch))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn histogrammedExtendedLaunch(&self) -> Retained<MXHistogram<NSUnitDuration>>;
80    );
81}
82
83/// Methods declared on superclass `NSObject`.
84#[cfg(feature = "MXMetric")]
85impl MXAppLaunchMetric {
86    extern_methods!(
87        #[unsafe(method(init))]
88        #[unsafe(method_family = init)]
89        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
90
91        #[unsafe(method(new))]
92        #[unsafe(method_family = new)]
93        pub unsafe fn new() -> Retained<Self>;
94    );
95}