objc2_metric_kit/generated/
MXDiagnostic.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 abstract class that describes a diagnostic report vended by MetricKit.
11    ///
12    /// All supported diagnostics are subclasses of MXDiagnostic.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxdiagnostic?language=objc)
15    #[unsafe(super(NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct MXDiagnostic;
18);
19
20extern_conformance!(
21    unsafe impl NSCoding for MXDiagnostic {}
22);
23
24extern_conformance!(
25    unsafe impl NSObjectProtocol for MXDiagnostic {}
26);
27
28extern_conformance!(
29    unsafe impl NSSecureCoding for MXDiagnostic {}
30);
31
32impl MXDiagnostic {
33    extern_methods!(
34        #[cfg(feature = "MXMetaData")]
35        #[unsafe(method(metaData))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn metaData(&self) -> Retained<MXMetaData>;
38
39        /// An NSString representation of the application version from which this diagnostic was generated.
40        #[unsafe(method(applicationVersion))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn applicationVersion(&self) -> Retained<NSString>;
43
44        #[cfg(feature = "MXSignpostRecord")]
45        /// An NSArray representing the list of signpost records.
46        #[unsafe(method(signpostData))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn signpostData(&self) -> Option<Retained<NSArray<MXSignpostRecord>>>;
49
50        /// Convenience method to return a JSON representation of this diagnostic.
51        ///
52        /// Returns: An NSData object containing the JSON representation
53        #[unsafe(method(JSONRepresentation))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn JSONRepresentation(&self) -> Retained<NSData>;
56
57        /// Convenience method to return a NSDictionary representation of this diagnostic.
58        ///
59        /// Returns: An NSDictionary object containing the dictionary representation
60        #[unsafe(method(dictionaryRepresentation))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn dictionaryRepresentation(&self) -> Retained<NSDictionary>;
63    );
64}
65
66/// Methods declared on superclass `NSObject`.
67impl MXDiagnostic {
68    extern_methods!(
69        #[unsafe(method(init))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
72
73        #[unsafe(method(new))]
74        #[unsafe(method_family = new)]
75        pub unsafe fn new() -> Retained<Self>;
76    );
77}