objc2-photos 0.3.2

Bindings to the Photos/PhotoKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/photos/phphotoserrordomain?language=objc)
    pub static PHPhotosErrorDomain: Option<&'static NSErrorDomain>;
}

extern "C" {
    /// Array of NSString values representing local identifiers related to the specific error
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/photos/phlocalidentifierserrorkey?language=objc)
    pub static PHLocalIdentifiersErrorKey: Option<&'static NSErrorUserInfoKey>;
}

/// [Apple's documentation](https://developer.apple.com/documentation/photos/phphotoserror?language=objc)
// NS_ERROR_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PHPhotosError(pub NSInteger);
impl PHPhotosError {
    #[doc(alias = "PHPhotosErrorInternalError")]
    pub const InternalError: Self = Self(-1);
    #[doc(alias = "PHPhotosErrorUserCancelled")]
    pub const UserCancelled: Self = Self(3072);
    #[doc(alias = "PHPhotosErrorLibraryVolumeOffline")]
    pub const LibraryVolumeOffline: Self = Self(3114);
    #[doc(alias = "PHPhotosErrorRelinquishingLibraryBundleToWriter")]
    pub const RelinquishingLibraryBundleToWriter: Self = Self(3142);
    #[doc(alias = "PHPhotosErrorSwitchingSystemPhotoLibrary")]
    pub const SwitchingSystemPhotoLibrary: Self = Self(3143);
    #[doc(alias = "PHPhotosErrorNetworkAccessRequired")]
    pub const NetworkAccessRequired: Self = Self(3164);
    #[doc(alias = "PHPhotosErrorNetworkError")]
    pub const NetworkError: Self = Self(3169);
    #[doc(alias = "PHPhotosErrorIdentifierNotFound")]
    pub const IdentifierNotFound: Self = Self(3201);
    #[doc(alias = "PHPhotosErrorMultipleIdentifiersFound")]
    pub const MultipleIdentifiersFound: Self = Self(3202);
    #[doc(alias = "PHPhotosErrorChangeNotSupported")]
    pub const ChangeNotSupported: Self = Self(3300);
    #[doc(alias = "PHPhotosErrorOperationInterrupted")]
    pub const OperationInterrupted: Self = Self(3301);
    #[doc(alias = "PHPhotosErrorInvalidResource")]
    pub const InvalidResource: Self = Self(3302);
    #[doc(alias = "PHPhotosErrorMissingResource")]
    pub const MissingResource: Self = Self(3303);
    #[doc(alias = "PHPhotosErrorNotEnoughSpace")]
    pub const NotEnoughSpace: Self = Self(3305);
    #[doc(alias = "PHPhotosErrorRequestNotSupportedForAsset")]
    pub const RequestNotSupportedForAsset: Self = Self(3306);
    #[doc(alias = "PHPhotosErrorAccessRestricted")]
    pub const AccessRestricted: Self = Self(3310);
    #[doc(alias = "PHPhotosErrorAccessUserDenied")]
    pub const AccessUserDenied: Self = Self(3311);
    #[doc(alias = "PHPhotosErrorLibraryInFileProviderSyncRoot")]
    pub const LibraryInFileProviderSyncRoot: Self = Self(5423);
    #[doc(alias = "PHPhotosErrorPersistentChangeTokenExpired")]
    pub const PersistentChangeTokenExpired: Self = Self(3105);
    #[doc(alias = "PHPhotosErrorPersistentChangeDetailsUnavailable")]
    pub const PersistentChangeDetailsUnavailable: Self = Self(3210);
    #[doc(alias = "PHPhotosErrorInvalid")]
    #[deprecated]
    pub const Invalid: Self = Self(-1);
}

unsafe impl Encode for PHPhotosError {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for PHPhotosError {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}