objc2-security 0.3.2

Bindings to the Security framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::cell::UnsafeCell;
use core::ffi::*;
use core::marker::{PhantomData, PhantomPinned};
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;

use crate::*;

extern "C-unwind" {
    /// # Safety
    ///
    /// `obj` must be a valid pointer.
    pub fn sec_retain(obj: *mut c_void) -> *mut c_void;
}

extern "C-unwind" {
    /// # Safety
    ///
    /// `obj` must be a valid pointer.
    pub fn sec_release(obj: *mut c_void);
}

/// A `sec_object` is a generic, ARC-able type wrapper for common CoreFoundation Security types.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/security/sec_object?language=objc)
#[repr(C)]
#[derive(Debug)]
pub struct sec_object {
    inner: [u8; 0],
    _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
}

#[cfg(feature = "objc2")]
unsafe impl RefEncode for sec_object {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Encoding::Struct("sec_object", &[]));
}

/// A `sec_object` is a generic, ARC-able type wrapper for common CoreFoundation Security types.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/security/sec_object_t?language=objc)
pub type sec_object_t = *mut sec_object;