objc2_security/generated/
SecProtocolObject.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::cell::UnsafeCell;
4use core::ffi::*;
5use core::marker::{PhantomData, PhantomPinned};
6#[cfg(feature = "objc2")]
7use objc2::__framework_prelude::*;
8
9use crate::*;
10
11extern "C-unwind" {
12    /// # Safety
13    ///
14    /// `obj` must be a valid pointer.
15    pub fn sec_retain(obj: *mut c_void) -> *mut c_void;
16}
17
18extern "C-unwind" {
19    /// # Safety
20    ///
21    /// `obj` must be a valid pointer.
22    pub fn sec_release(obj: *mut c_void);
23}
24
25/// A `sec_object` is a generic, ARC-able type wrapper for common CoreFoundation Security types.
26///
27/// See also [Apple's documentation](https://developer.apple.com/documentation/security/sec_object?language=objc)
28#[repr(C)]
29#[derive(Debug)]
30pub struct sec_object {
31    inner: [u8; 0],
32    _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
33}
34
35#[cfg(feature = "objc2")]
36unsafe impl RefEncode for sec_object {
37    const ENCODING_REF: Encoding = Encoding::Pointer(&Encoding::Struct("sec_object", &[]));
38}
39
40/// A `sec_object` is a generic, ARC-able type wrapper for common CoreFoundation Security types.
41///
42/// See also [Apple's documentation](https://developer.apple.com/documentation/security/sec_object_t?language=objc)
43pub type sec_object_t = *mut sec_object;