objc2_metric_kit/generated/
MXGPUMetric.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 GPU metrics.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxgpumetric?language=objc)
13    #[unsafe(super(MXMetric, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "MXMetric")]
16    pub struct MXGPUMetric;
17);
18
19#[cfg(feature = "MXMetric")]
20unsafe impl NSCoding for MXGPUMetric {}
21
22#[cfg(feature = "MXMetric")]
23unsafe impl NSObjectProtocol for MXGPUMetric {}
24
25#[cfg(feature = "MXMetric")]
26unsafe impl NSSecureCoding for MXGPUMetric {}
27
28#[cfg(feature = "MXMetric")]
29impl MXGPUMetric {
30    extern_methods!(
31        /// GPU time aggregated cumulatively.
32        ///
33        /// The data here represents the total GPU time an application consumed over the date range of the containing payload.
34        ///
35        /// Dimensioned as NSUnitDuration.
36        #[unsafe(method(cumulativeGPUTime))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn cumulativeGPUTime(&self) -> Retained<NSMeasurement<NSUnitDuration>>;
39    );
40}
41
42/// Methods declared on superclass `NSObject`.
43#[cfg(feature = "MXMetric")]
44impl MXGPUMetric {
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}