objc2_safety_kit/generated/
SACrashDetectionEvent.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-location")]
6use objc2_core_location::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11#[repr(transparent)]
18#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
19pub struct SACrashDetectionEventResponse(pub NSInteger);
20impl SACrashDetectionEventResponse {
21 #[doc(alias = "SACrashDetectionEventResponseAttempted")]
23 pub const Attempted: Self = Self(0);
24 #[doc(alias = "SACrashDetectionEventResponseDisabled")]
26 pub const Disabled: Self = Self(1);
27}
28
29unsafe impl Encode for SACrashDetectionEventResponse {
30 const ENCODING: Encoding = NSInteger::ENCODING;
31}
32
33unsafe impl RefEncode for SACrashDetectionEventResponse {
34 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
35}
36
37extern_class!(
38 #[unsafe(super(NSObject))]
44 #[derive(Debug, PartialEq, Eq, Hash)]
45 pub struct SACrashDetectionEvent;
46);
47
48extern_conformance!(
49 unsafe impl NSCoding for SACrashDetectionEvent {}
50);
51
52extern_conformance!(
53 unsafe impl NSCopying for SACrashDetectionEvent {}
54);
55
56unsafe impl CopyingHelper for SACrashDetectionEvent {
57 type Result = Self;
58}
59
60extern_conformance!(
61 unsafe impl NSObjectProtocol for SACrashDetectionEvent {}
62);
63
64extern_conformance!(
65 unsafe impl NSSecureCoding for SACrashDetectionEvent {}
66);
67
68impl SACrashDetectionEvent {
69 extern_methods!(
70 #[unsafe(method(new))]
71 #[unsafe(method_family = new)]
72 pub unsafe fn new() -> Retained<Self>;
73
74 #[unsafe(method(init))]
75 #[unsafe(method_family = init)]
76 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
77
78 #[unsafe(method(date))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn date(&self) -> Retained<NSDate>;
85
86 #[unsafe(method(response))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn response(&self) -> SACrashDetectionEventResponse;
96
97 #[cfg(feature = "objc2-core-location")]
98 #[unsafe(method(location))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn location(&self) -> Option<Retained<CLLocation>>;
108 );
109}