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")]
20extern_conformance!(
21    unsafe impl NSCoding for MXGPUMetric {}
22);
23
24#[cfg(feature = "MXMetric")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for MXGPUMetric {}
27);
28
29#[cfg(feature = "MXMetric")]
30extern_conformance!(
31    unsafe impl NSSecureCoding for MXGPUMetric {}
32);
33
34#[cfg(feature = "MXMetric")]
35impl MXGPUMetric {
36    extern_methods!(
37        /// GPU time aggregated cumulatively.
38        ///
39        /// The data here represents the total GPU time an application consumed over the date range of the containing payload.
40        ///
41        /// Dimensioned as NSUnitDuration.
42        #[unsafe(method(cumulativeGPUTime))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn cumulativeGPUTime(&self) -> Retained<NSMeasurement<NSUnitDuration>>;
45    );
46}
47
48/// Methods declared on superclass `NSObject`.
49#[cfg(feature = "MXMetric")]
50impl MXGPUMetric {
51    extern_methods!(
52        #[unsafe(method(init))]
53        #[unsafe(method_family = init)]
54        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
55
56        #[unsafe(method(new))]
57        #[unsafe(method_family = new)]
58        pub unsafe fn new() -> Retained<Self>;
59    );
60}