objc2_metric_kit/generated/
MXAppLaunchDiagnostic.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 MXDiagnostic subclass that encapsulates app launch diagnostic reports.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxapplaunchdiagnostic?language=objc)
13    #[unsafe(super(MXDiagnostic, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "MXDiagnostic")]
16    pub struct MXAppLaunchDiagnostic;
17);
18
19#[cfg(feature = "MXDiagnostic")]
20extern_conformance!(
21    unsafe impl NSCoding for MXAppLaunchDiagnostic {}
22);
23
24#[cfg(feature = "MXDiagnostic")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for MXAppLaunchDiagnostic {}
27);
28
29#[cfg(feature = "MXDiagnostic")]
30extern_conformance!(
31    unsafe impl NSSecureCoding for MXAppLaunchDiagnostic {}
32);
33
34#[cfg(feature = "MXDiagnostic")]
35impl MXAppLaunchDiagnostic {
36    extern_methods!(
37        #[cfg(feature = "MXCallStackTree")]
38        /// The application call stack tree associated with the app launch.
39        #[unsafe(method(callStackTree))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn callStackTree(&self) -> Retained<MXCallStackTree>;
42
43        /// Total app launch duration.
44        ///
45        /// Dimensioned as NSUnitDuration.
46        #[unsafe(method(launchDuration))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn launchDuration(&self) -> Retained<NSMeasurement<NSUnitDuration>>;
49    );
50}
51
52/// Methods declared on superclass `NSObject`.
53#[cfg(feature = "MXDiagnostic")]
54impl MXAppLaunchDiagnostic {
55    extern_methods!(
56        #[unsafe(method(init))]
57        #[unsafe(method_family = init)]
58        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
59
60        #[unsafe(method(new))]
61        #[unsafe(method_family = new)]
62        pub unsafe fn new() -> Retained<Self>;
63    );
64}