objc2_metric_kit/generated/
MXCrashDiagnosticObjectiveCExceptionReason.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    /// A class that represents Crash exception reason.
11    ///
12    /// Crash reports that are caused by an uncaught Objective-C NSException can in some cases contain detailed information about the type, name and description of the exception object.
13    /// This information is captured in a structured way in a MXCrashDiagnosticObjectiveCExceptionReason object and may have some pieces redacted to avoid exposing sensitive user data.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxcrashdiagnosticobjectivecexceptionreason?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct MXCrashDiagnosticObjectiveCExceptionReason;
19);
20
21extern_conformance!(
22    unsafe impl NSCoding for MXCrashDiagnosticObjectiveCExceptionReason {}
23);
24
25extern_conformance!(
26    unsafe impl NSObjectProtocol for MXCrashDiagnosticObjectiveCExceptionReason {}
27);
28
29extern_conformance!(
30    unsafe impl NSSecureCoding for MXCrashDiagnosticObjectiveCExceptionReason {}
31);
32
33impl MXCrashDiagnosticObjectiveCExceptionReason {
34    extern_methods!(
35        /// A human-readable message string summarizing the reason for the exception.
36        #[unsafe(method(composedMessage))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn composedMessage(&self) -> Retained<NSString>;
39
40        /// A string representing the exception message before arguments are substituted into the message
41        #[unsafe(method(formatString))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn formatString(&self) -> Retained<NSString>;
44
45        /// An NSArray of strings representing arguments passed to the formatString.
46        #[unsafe(method(arguments))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn arguments(&self) -> Retained<NSArray<NSString>>;
49
50        /// A human-readable string denoting type of the exception
51        #[unsafe(method(exceptionType))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn exceptionType(&self) -> Retained<NSString>;
54
55        /// A string representing the class name of the exception, for example NSException.
56        #[unsafe(method(className))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn className(&self) -> Retained<NSString>;
59
60        /// A string representing name of the exception
61        ///
62        /// This will align with the "name" field of the NSException
63        #[unsafe(method(exceptionName))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn exceptionName(&self) -> Retained<NSString>;
66
67        /// Convenience method to return a JSON representation of this MXCrashDiagnosticObjectiveCExceptionReason object.
68        ///
69        /// Returns: An NSData object containing the JSON representation
70        #[unsafe(method(JSONRepresentation))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn JSONRepresentation(&self) -> Retained<NSData>;
73
74        /// Convenience method to return a NSDictionary representation of this MXCrashDiagnosticObjectiveCExceptionReason object.
75        ///
76        /// Returns: An NSDictionary object containing the dictionary representation
77        #[unsafe(method(dictionaryRepresentation))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn dictionaryRepresentation(&self) -> Retained<NSDictionary>;
80    );
81}
82
83/// Methods declared on superclass `NSObject`.
84impl MXCrashDiagnosticObjectiveCExceptionReason {
85    extern_methods!(
86        #[unsafe(method(init))]
87        #[unsafe(method_family = init)]
88        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
89
90        #[unsafe(method(new))]
91        #[unsafe(method_family = new)]
92        pub unsafe fn new() -> Retained<Self>;
93    );
94}