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
21unsafe impl NSCoding for MXCrashDiagnosticObjectiveCExceptionReason {}
22
23unsafe impl NSObjectProtocol for MXCrashDiagnosticObjectiveCExceptionReason {}
24
25unsafe impl NSSecureCoding for MXCrashDiagnosticObjectiveCExceptionReason {}
26
27impl MXCrashDiagnosticObjectiveCExceptionReason {
28    extern_methods!(
29        /// A human-readable message string summarizing the reason for the exception.
30        #[unsafe(method(composedMessage))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn composedMessage(&self) -> Retained<NSString>;
33
34        /// A string representing the exception message before arguments are substituted into the message
35        #[unsafe(method(formatString))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn formatString(&self) -> Retained<NSString>;
38
39        /// An NSArray of strings representing arguments passed to the formatString.
40        #[unsafe(method(arguments))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn arguments(&self) -> Retained<NSArray<NSString>>;
43
44        /// A human-readable string denoting type of the exception
45        #[unsafe(method(exceptionType))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn exceptionType(&self) -> Retained<NSString>;
48
49        /// A string representing the class name of the exception, for example NSException.
50        #[unsafe(method(className))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn className(&self) -> Retained<NSString>;
53
54        /// A string representing name of the exception
55        ///
56        /// This will align with the "name" field of the NSException
57        #[unsafe(method(exceptionName))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn exceptionName(&self) -> Retained<NSString>;
60
61        /// Convenience method to return a JSON representation of this MXCrashDiagnosticObjectiveCExceptionReason object.
62        ///
63        /// Returns: An NSData object containing the JSON representation
64        #[unsafe(method(JSONRepresentation))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn JSONRepresentation(&self) -> Retained<NSData>;
67
68        /// Convenience method to return a NSDictionary representation of this MXCrashDiagnosticObjectiveCExceptionReason object.
69        ///
70        /// Returns: An NSDictionary object containing the dictionary representation
71        #[unsafe(method(dictionaryRepresentation))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn dictionaryRepresentation(&self) -> Retained<NSDictionary>;
74    );
75}
76
77/// Methods declared on superclass `NSObject`.
78impl MXCrashDiagnosticObjectiveCExceptionReason {
79    extern_methods!(
80        #[unsafe(method(init))]
81        #[unsafe(method_family = init)]
82        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84        #[unsafe(method(new))]
85        #[unsafe(method_family = new)]
86        pub unsafe fn new() -> Retained<Self>;
87    );
88}