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