objc2-safety-kit 0.3.2

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

use crate::*;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/safetykit/saerrordomain?language=objc)
    pub static SAErrorDomain: &'static NSErrorDomain;
}

/// [Apple's documentation](https://developer.apple.com/documentation/safetykit/saerrorcode?language=objc)
// NS_ERROR_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SAErrorCode(pub NSInteger);
impl SAErrorCode {
    #[doc(alias = "SAErrorNotAuthorized")]
    pub const NotAuthorized: Self = Self(1);
    #[doc(alias = "SAErrorNotAllowed")]
    pub const NotAllowed: Self = Self(2);
    #[doc(alias = "SAErrorInvalidArgument")]
    pub const InvalidArgument: Self = Self(3);
    #[doc(alias = "SAErrorOperationFailed")]
    pub const OperationFailed: Self = Self(4);
}

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

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