objc2_ar_kit/generated/
ARError.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-foundation")]
7use objc2_foundation::*;
8
9use crate::*;
10
11extern "C" {
12    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arerrordomain?language=objc)
13    #[cfg(feature = "objc2-foundation")]
14    pub static ARErrorDomain: &'static NSString;
15}
16
17/// [Apple's documentation](https://developer.apple.com/documentation/arkit/arerrorcode?language=objc)
18// NS_ERROR_ENUM
19#[cfg(feature = "objc2")]
20#[repr(transparent)]
21#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
22pub struct ARErrorCode(pub NSInteger);
23#[cfg(feature = "objc2")]
24impl ARErrorCode {
25    /// Unsupported configuration.
26    #[doc(alias = "ARErrorCodeUnsupportedConfiguration")]
27    pub const UnsupportedConfiguration: Self = Self(100);
28    /// A sensor required to run the session is not available.
29    #[doc(alias = "ARErrorCodeSensorUnavailable")]
30    pub const SensorUnavailable: Self = Self(101);
31    /// A sensor failed to provide the required input.
32    #[doc(alias = "ARErrorCodeSensorFailed")]
33    pub const SensorFailed: Self = Self(102);
34    /// App does not have permission to use the camera. The user may change this in settings.
35    #[doc(alias = "ARErrorCodeCameraUnauthorized")]
36    pub const CameraUnauthorized: Self = Self(103);
37    /// App does not have permission to use the microphone. The user may change this in settings.
38    #[doc(alias = "ARErrorCodeMicrophoneUnauthorized")]
39    pub const MicrophoneUnauthorized: Self = Self(104);
40    /// App does not have permission to use the location data of the device. The user may change this in settings.
41    #[doc(alias = "ARErrorCodeLocationUnauthorized")]
42    pub const LocationUnauthorized: Self = Self(105);
43    /// A high-resolution frame is requested while another one is being captured.
44    #[doc(alias = "ARErrorCodeHighResolutionFrameCaptureInProgress")]
45    pub const HighResolutionFrameCaptureInProgress: Self = Self(106);
46    /// High-resolution frame capture failed.
47    #[doc(alias = "ARErrorCodeHighResolutionFrameCaptureFailed")]
48    pub const HighResolutionFrameCaptureFailed: Self = Self(107);
49    /// World tracking has encountered a fatal error.
50    #[doc(alias = "ARErrorCodeWorldTrackingFailed")]
51    pub const WorldTrackingFailed: Self = Self(200);
52    /// Geo tracking is not available at this location.
53    #[doc(alias = "ARErrorCodeGeoTrackingNotAvailableAtLocation")]
54    pub const GeoTrackingNotAvailableAtLocation: Self = Self(201);
55    /// Geo tracking has encountered a runtime error.
56    #[doc(alias = "ARErrorCodeGeoTrackingFailed")]
57    pub const GeoTrackingFailed: Self = Self(202);
58    /// Invalid reference image
59    #[doc(alias = "ARErrorCodeInvalidReferenceImage")]
60    pub const InvalidReferenceImage: Self = Self(300);
61    /// Invalid reference object.
62    #[doc(alias = "ARErrorCodeInvalidReferenceObject")]
63    pub const InvalidReferenceObject: Self = Self(301);
64    /// Invalid world map.
65    #[doc(alias = "ARErrorCodeInvalidWorldMap")]
66    pub const InvalidWorldMap: Self = Self(302);
67    /// Invalid configuration.
68    #[doc(alias = "ARErrorCodeInvalidConfiguration")]
69    pub const InvalidConfiguration: Self = Self(303);
70    /// Invalid collaboration data.
71    #[doc(alias = "ARErrorCodeInvalidCollaborationData")]
72    pub const InvalidCollaborationData: Self = Self(304);
73    /// Insufficient features.
74    #[doc(alias = "ARErrorCodeInsufficientFeatures")]
75    pub const InsufficientFeatures: Self = Self(400);
76    /// Object merge failed.
77    #[doc(alias = "ARErrorCodeObjectMergeFailed")]
78    pub const ObjectMergeFailed: Self = Self(401);
79    /// Unable to read or write to file.
80    #[doc(alias = "ARErrorCodeFileIOFailed")]
81    pub const FileIOFailed: Self = Self(500);
82    /// Generic request failure.
83    #[doc(alias = "ARErrorCodeRequestFailed")]
84    pub const RequestFailed: Self = Self(501);
85}
86
87#[cfg(feature = "objc2")]
88unsafe impl Encode for ARErrorCode {
89    const ENCODING: Encoding = NSInteger::ENCODING;
90}
91
92#[cfg(feature = "objc2")]
93unsafe impl RefEncode for ARErrorCode {
94    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
95}