objc2_metric_kit/generated/
MXDiskIOMetric.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 MXMetric subclass that encapsulates disk IO metrics.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxdiskiometric?language=objc)
13    #[unsafe(super(MXMetric, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "MXMetric")]
16    pub struct MXDiskIOMetric;
17);
18
19#[cfg(feature = "MXMetric")]
20unsafe impl NSCoding for MXDiskIOMetric {}
21
22#[cfg(feature = "MXMetric")]
23unsafe impl NSObjectProtocol for MXDiskIOMetric {}
24
25#[cfg(feature = "MXMetric")]
26unsafe impl NSSecureCoding for MXDiskIOMetric {}
27
28#[cfg(feature = "MXMetric")]
29impl MXDiskIOMetric {
30    extern_methods!(
31        /// Cumulative amount of logical writes.
32        ///
33        /// Dimensioned as NSUnitInformationStorage.
34        #[unsafe(method(cumulativeLogicalWrites))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn cumulativeLogicalWrites(
37            &self,
38        ) -> Retained<NSMeasurement<NSUnitInformationStorage>>;
39    );
40}
41
42/// Methods declared on superclass `NSObject`.
43#[cfg(feature = "MXMetric")]
44impl MXDiskIOMetric {
45    extern_methods!(
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50        #[unsafe(method(new))]
51        #[unsafe(method_family = new)]
52        pub unsafe fn new() -> Retained<Self>;
53    );
54}