icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::Foundation::*;
use crate::MetricKit::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MetricKit_MXForegroundExitData")]
    pub struct MXForegroundExitData;

    #[cfg(feature = "MetricKit_MXForegroundExitData")]
    unsafe impl ClassType for MXForegroundExitData {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "MetricKit_MXForegroundExitData")]
unsafe impl NSCoding for MXForegroundExitData {}

#[cfg(feature = "MetricKit_MXForegroundExitData")]
unsafe impl NSObjectProtocol for MXForegroundExitData {}

#[cfg(feature = "MetricKit_MXForegroundExitData")]
unsafe impl NSSecureCoding for MXForegroundExitData {}

extern_methods!(
    #[cfg(feature = "MetricKit_MXForegroundExitData")]
    unsafe impl MXForegroundExitData {
        #[method(cumulativeNormalAppExitCount)]
        pub unsafe fn cumulativeNormalAppExitCount(&self) -> NSUInteger;

        #[method(cumulativeMemoryResourceLimitExitCount)]
        pub unsafe fn cumulativeMemoryResourceLimitExitCount(&self) -> NSUInteger;

        #[method(cumulativeBadAccessExitCount)]
        pub unsafe fn cumulativeBadAccessExitCount(&self) -> NSUInteger;

        #[method(cumulativeAbnormalExitCount)]
        pub unsafe fn cumulativeAbnormalExitCount(&self) -> NSUInteger;

        #[method(cumulativeIllegalInstructionExitCount)]
        pub unsafe fn cumulativeIllegalInstructionExitCount(&self) -> NSUInteger;

        #[method(cumulativeAppWatchdogExitCount)]
        pub unsafe fn cumulativeAppWatchdogExitCount(&self) -> NSUInteger;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "MetricKit_MXForegroundExitData")]
    unsafe impl MXForegroundExitData {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MetricKit_MXBackgroundExitData")]
    pub struct MXBackgroundExitData;

    #[cfg(feature = "MetricKit_MXBackgroundExitData")]
    unsafe impl ClassType for MXBackgroundExitData {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "MetricKit_MXBackgroundExitData")]
unsafe impl NSCoding for MXBackgroundExitData {}

#[cfg(feature = "MetricKit_MXBackgroundExitData")]
unsafe impl NSObjectProtocol for MXBackgroundExitData {}

#[cfg(feature = "MetricKit_MXBackgroundExitData")]
unsafe impl NSSecureCoding for MXBackgroundExitData {}

extern_methods!(
    #[cfg(feature = "MetricKit_MXBackgroundExitData")]
    unsafe impl MXBackgroundExitData {
        #[method(cumulativeNormalAppExitCount)]
        pub unsafe fn cumulativeNormalAppExitCount(&self) -> NSUInteger;

        #[method(cumulativeMemoryResourceLimitExitCount)]
        pub unsafe fn cumulativeMemoryResourceLimitExitCount(&self) -> NSUInteger;

        #[method(cumulativeCPUResourceLimitExitCount)]
        pub unsafe fn cumulativeCPUResourceLimitExitCount(&self) -> NSUInteger;

        #[method(cumulativeMemoryPressureExitCount)]
        pub unsafe fn cumulativeMemoryPressureExitCount(&self) -> NSUInteger;

        #[method(cumulativeBadAccessExitCount)]
        pub unsafe fn cumulativeBadAccessExitCount(&self) -> NSUInteger;

        #[method(cumulativeAbnormalExitCount)]
        pub unsafe fn cumulativeAbnormalExitCount(&self) -> NSUInteger;

        #[method(cumulativeIllegalInstructionExitCount)]
        pub unsafe fn cumulativeIllegalInstructionExitCount(&self) -> NSUInteger;

        #[method(cumulativeAppWatchdogExitCount)]
        pub unsafe fn cumulativeAppWatchdogExitCount(&self) -> NSUInteger;

        #[method(cumulativeSuspendedWithLockedFileExitCount)]
        pub unsafe fn cumulativeSuspendedWithLockedFileExitCount(&self) -> NSUInteger;

        #[method(cumulativeBackgroundTaskAssertionTimeoutExitCount)]
        pub unsafe fn cumulativeBackgroundTaskAssertionTimeoutExitCount(&self) -> NSUInteger;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "MetricKit_MXBackgroundExitData")]
    unsafe impl MXBackgroundExitData {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MetricKit_MXAppExitMetric")]
    pub struct MXAppExitMetric;

    #[cfg(feature = "MetricKit_MXAppExitMetric")]
    unsafe impl ClassType for MXAppExitMetric {
        #[inherits(NSObject)]
        type Super = MXMetric;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "MetricKit_MXAppExitMetric")]
unsafe impl NSCoding for MXAppExitMetric {}

#[cfg(feature = "MetricKit_MXAppExitMetric")]
unsafe impl NSObjectProtocol for MXAppExitMetric {}

#[cfg(feature = "MetricKit_MXAppExitMetric")]
unsafe impl NSSecureCoding for MXAppExitMetric {}

extern_methods!(
    #[cfg(feature = "MetricKit_MXAppExitMetric")]
    unsafe impl MXAppExitMetric {
        #[cfg(feature = "MetricKit_MXForegroundExitData")]
        #[method_id(@__retain_semantics Other foregroundExitData)]
        pub unsafe fn foregroundExitData(&self) -> Id<MXForegroundExitData>;

        #[cfg(feature = "MetricKit_MXBackgroundExitData")]
        #[method_id(@__retain_semantics Other backgroundExitData)]
        pub unsafe fn backgroundExitData(&self) -> Id<MXBackgroundExitData>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "MetricKit_MXAppExitMetric")]
    unsafe impl MXAppExitMetric {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);