objc2_metric_kit/generated/
MXCellularConditionMetric.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 cellular condition metrics.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxcellularconditionmetric?language=objc)
13    #[unsafe(super(MXMetric, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "MXMetric")]
16    pub struct MXCellularConditionMetric;
17);
18
19#[cfg(feature = "MXMetric")]
20extern_conformance!(
21    unsafe impl NSCoding for MXCellularConditionMetric {}
22);
23
24#[cfg(feature = "MXMetric")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for MXCellularConditionMetric {}
27);
28
29#[cfg(feature = "MXMetric")]
30extern_conformance!(
31    unsafe impl NSSecureCoding for MXCellularConditionMetric {}
32);
33
34#[cfg(feature = "MXMetric")]
35impl MXCellularConditionMetric {
36    extern_methods!(
37        #[cfg(all(feature = "MXHistogram", feature = "MXUnit"))]
38        /// Application run time bucketized by cellular condition.
39        ///
40        /// This data represents the percentage of time an application spent running in different cellular conditions.
41        ///
42        /// In the event that no data for any buckets is available, the histogram data will be empty.
43        ///
44        /// Dimensioned as MXUnitSignalBars.
45        #[unsafe(method(histogrammedCellularConditionTime))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn histogrammedCellularConditionTime(
48            &self,
49        ) -> Retained<MXHistogram<MXUnitSignalBars>>;
50    );
51}
52
53/// Methods declared on superclass `NSObject`.
54#[cfg(feature = "MXMetric")]
55impl MXCellularConditionMetric {
56    extern_methods!(
57        #[unsafe(method(init))]
58        #[unsafe(method_family = init)]
59        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
60
61        #[unsafe(method(new))]
62        #[unsafe(method_family = new)]
63        pub unsafe fn new() -> Retained<Self>;
64    );
65}