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")]
20unsafe impl NSCoding for MXCellularConditionMetric {}
21
22#[cfg(feature = "MXMetric")]
23unsafe impl NSObjectProtocol for MXCellularConditionMetric {}
24
25#[cfg(feature = "MXMetric")]
26unsafe impl NSSecureCoding for MXCellularConditionMetric {}
27
28#[cfg(feature = "MXMetric")]
29impl MXCellularConditionMetric {
30    extern_methods!(
31        #[cfg(all(feature = "MXHistogram", feature = "MXUnit"))]
32        /// Application run time bucketized by cellular condition.
33        ///
34        /// This data represents the percentage of time an application spent running in different cellular conditions.
35        ///
36        /// In the event that no data for any buckets is available, the histogram data will be empty.
37        ///
38        /// Dimensioned as MXUnitSignalBars.
39        #[unsafe(method(histogrammedCellularConditionTime))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn histogrammedCellularConditionTime(
42            &self,
43        ) -> Retained<MXHistogram<MXUnitSignalBars>>;
44    );
45}
46
47/// Methods declared on superclass `NSObject`.
48#[cfg(feature = "MXMetric")]
49impl MXCellularConditionMetric {
50    extern_methods!(
51        #[unsafe(method(init))]
52        #[unsafe(method_family = init)]
53        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
54
55        #[unsafe(method(new))]
56        #[unsafe(method_family = new)]
57        pub unsafe fn new() -> Retained<Self>;
58    );
59}