objc2_metric_kit/generated/
MXError.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4use objc2_foundation::*;
5
6use crate::*;
7
8extern "C" {
9    /// Error domain for NSError values stemming from the MetricKit Framework API.
10    ///
11    /// This error domain is used as the domain for all NSError instances stemming from the MetricKit Framework.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxerrordomain?language=objc)
14    pub static MXErrorDomain: Option<&'static NSErrorDomain>;
15}
16
17/// Error codes for NSError values stemming from the MetricKit Framework.
18///
19/// These error codes are used as the codes for all NSError instances stemmming from the MetricKit Framework.
20///
21/// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxerrorcode?language=objc)
22// NS_ERROR_ENUM
23#[repr(transparent)]
24#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
25pub struct MXErrorCode(pub NSInteger);
26impl MXErrorCode {
27    #[doc(alias = "MXErrorLaunchTaskInvalidID")]
28    pub const LaunchTaskInvalidID: Self = Self(0);
29    #[doc(alias = "MXErrorLaunchTaskMaxCount")]
30    pub const LaunchTaskMaxCount: Self = Self(1);
31    #[doc(alias = "MXErrorLaunchTaskPastDeadline")]
32    pub const LaunchTaskPastDeadline: Self = Self(2);
33    #[doc(alias = "MXErrorLaunchTaskDuplicated")]
34    pub const LaunchTaskDuplicated: Self = Self(3);
35    #[doc(alias = "MXErrorLaunchTaskUnknown")]
36    pub const LaunchTaskUnknown: Self = Self(4);
37    #[doc(alias = "MXErrorLaunchTaskInternalFailure")]
38    pub const LaunchTaskInternalFailure: Self = Self(5);
39}
40
41unsafe impl Encode for MXErrorCode {
42    const ENCODING: Encoding = NSInteger::ENCODING;
43}
44
45unsafe impl RefEncode for MXErrorCode {
46    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
47}