objc2-ar-kit 0.3.2

Bindings to the ARKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-foundation")]
use objc2_foundation::*;

use crate::*;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arerrordomain?language=objc)
    #[cfg(feature = "objc2-foundation")]
    pub static ARErrorDomain: &'static NSString;
}

/// [Apple's documentation](https://developer.apple.com/documentation/arkit/arerrorcode?language=objc)
// NS_ERROR_ENUM
#[cfg(feature = "objc2")]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ARErrorCode(pub NSInteger);
#[cfg(feature = "objc2")]
impl ARErrorCode {
    /// Unsupported configuration.
    #[doc(alias = "ARErrorCodeUnsupportedConfiguration")]
    pub const UnsupportedConfiguration: Self = Self(100);
    /// A sensor required to run the session is not available.
    #[doc(alias = "ARErrorCodeSensorUnavailable")]
    pub const SensorUnavailable: Self = Self(101);
    /// A sensor failed to provide the required input.
    #[doc(alias = "ARErrorCodeSensorFailed")]
    pub const SensorFailed: Self = Self(102);
    /// App does not have permission to use the camera. The user may change this in settings.
    #[doc(alias = "ARErrorCodeCameraUnauthorized")]
    pub const CameraUnauthorized: Self = Self(103);
    /// App does not have permission to use the microphone. The user may change this in settings.
    #[doc(alias = "ARErrorCodeMicrophoneUnauthorized")]
    pub const MicrophoneUnauthorized: Self = Self(104);
    /// App does not have permission to use the location data of the device. The user may change this in settings.
    #[doc(alias = "ARErrorCodeLocationUnauthorized")]
    pub const LocationUnauthorized: Self = Self(105);
    /// A high-resolution frame is requested while another one is being captured.
    #[doc(alias = "ARErrorCodeHighResolutionFrameCaptureInProgress")]
    pub const HighResolutionFrameCaptureInProgress: Self = Self(106);
    /// High-resolution frame capture failed.
    #[doc(alias = "ARErrorCodeHighResolutionFrameCaptureFailed")]
    pub const HighResolutionFrameCaptureFailed: Self = Self(107);
    /// World tracking has encountered a fatal error.
    #[doc(alias = "ARErrorCodeWorldTrackingFailed")]
    pub const WorldTrackingFailed: Self = Self(200);
    /// Geo tracking is not available at this location.
    #[doc(alias = "ARErrorCodeGeoTrackingNotAvailableAtLocation")]
    pub const GeoTrackingNotAvailableAtLocation: Self = Self(201);
    /// Geo tracking has encountered a runtime error.
    #[doc(alias = "ARErrorCodeGeoTrackingFailed")]
    pub const GeoTrackingFailed: Self = Self(202);
    /// Invalid reference image
    #[doc(alias = "ARErrorCodeInvalidReferenceImage")]
    pub const InvalidReferenceImage: Self = Self(300);
    /// Invalid reference object.
    #[doc(alias = "ARErrorCodeInvalidReferenceObject")]
    pub const InvalidReferenceObject: Self = Self(301);
    /// Invalid world map.
    #[doc(alias = "ARErrorCodeInvalidWorldMap")]
    pub const InvalidWorldMap: Self = Self(302);
    /// Invalid configuration.
    #[doc(alias = "ARErrorCodeInvalidConfiguration")]
    pub const InvalidConfiguration: Self = Self(303);
    /// Invalid collaboration data.
    #[doc(alias = "ARErrorCodeInvalidCollaborationData")]
    pub const InvalidCollaborationData: Self = Self(304);
    /// Insufficient features.
    #[doc(alias = "ARErrorCodeInsufficientFeatures")]
    pub const InsufficientFeatures: Self = Self(400);
    /// Object merge failed.
    #[doc(alias = "ARErrorCodeObjectMergeFailed")]
    pub const ObjectMergeFailed: Self = Self(401);
    /// Unable to read or write to file.
    #[doc(alias = "ARErrorCodeFileIOFailed")]
    pub const FileIOFailed: Self = Self(500);
    /// Generic request failure.
    #[doc(alias = "ARErrorCodeRequestFailed")]
    pub const RequestFailed: Self = Self(501);
}

#[cfg(feature = "objc2")]
unsafe impl Encode for ARErrorCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

#[cfg(feature = "objc2")]
unsafe impl RefEncode for ARErrorCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}