objc2-accounts 0.3.2

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

use crate::*;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/accounts/acerrordomain?language=objc)
    pub static ACErrorDomain: Option<&'static NSString>;
}

/// [Apple's documentation](https://developer.apple.com/documentation/accounts/acerrorcode?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ACErrorCode(pub c_uint);
impl ACErrorCode {
    #[doc(alias = "ACErrorUnknown")]
    pub const Unknown: Self = Self(1);
    #[doc(alias = "ACErrorAccountMissingRequiredProperty")]
    pub const AccountMissingRequiredProperty: Self = Self(2);
    #[doc(alias = "ACErrorAccountAuthenticationFailed")]
    pub const AccountAuthenticationFailed: Self = Self(3);
    #[doc(alias = "ACErrorAccountTypeInvalid")]
    pub const AccountTypeInvalid: Self = Self(4);
    #[doc(alias = "ACErrorAccountAlreadyExists")]
    pub const AccountAlreadyExists: Self = Self(5);
    #[doc(alias = "ACErrorAccountNotFound")]
    pub const AccountNotFound: Self = Self(6);
    #[doc(alias = "ACErrorPermissionDenied")]
    pub const PermissionDenied: Self = Self(7);
    #[doc(alias = "ACErrorAccessInfoInvalid")]
    pub const AccessInfoInvalid: Self = Self(8);
    #[doc(alias = "ACErrorClientPermissionDenied")]
    pub const ClientPermissionDenied: Self = Self(9);
    #[doc(alias = "ACErrorAccessDeniedByProtectionPolicy")]
    pub const AccessDeniedByProtectionPolicy: Self = Self(10);
    #[doc(alias = "ACErrorCredentialNotFound")]
    pub const CredentialNotFound: Self = Self(11);
    #[doc(alias = "ACErrorFetchCredentialFailed")]
    pub const FetchCredentialFailed: Self = Self(12);
    #[doc(alias = "ACErrorStoreCredentialFailed")]
    pub const StoreCredentialFailed: Self = Self(13);
    #[doc(alias = "ACErrorRemoveCredentialFailed")]
    pub const RemoveCredentialFailed: Self = Self(14);
    #[doc(alias = "ACErrorUpdatingNonexistentAccount")]
    pub const UpdatingNonexistentAccount: Self = Self(15);
    #[doc(alias = "ACErrorInvalidClientBundleID")]
    pub const InvalidClientBundleID: Self = Self(16);
    #[doc(alias = "ACErrorDeniedByPlugin")]
    pub const DeniedByPlugin: Self = Self(17);
    #[doc(alias = "ACErrorCoreDataSaveFailed")]
    pub const CoreDataSaveFailed: Self = Self(18);
    #[doc(alias = "ACErrorFailedSerializingAccountInfo")]
    pub const FailedSerializingAccountInfo: Self = Self(19);
    #[doc(alias = "ACErrorInvalidCommand")]
    pub const InvalidCommand: Self = Self(20);
    #[doc(alias = "ACErrorMissingTransportMessageID")]
    pub const MissingTransportMessageID: Self = Self(21);
    #[doc(alias = "ACErrorCredentialItemNotFound")]
    pub const CredentialItemNotFound: Self = Self(22);
    #[doc(alias = "ACErrorCredentialItemNotExpired")]
    pub const CredentialItemNotExpired: Self = Self(23);
}

unsafe impl Encode for ACErrorCode {
    const ENCODING: Encoding = c_uint::ENCODING;
}

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