Skip to main content

security_framework/os/macos/
keychain_item.rs

1#![allow(unused_imports)]
2//! Keychain item support.
3use core_foundation::base::TCFType;
4use core_foundation::{declare_TCFType, impl_TCFType};
5use security_framework_sys::base::SecKeychainItemRef;
6use security_framework_sys::keychain_item::SecKeychainItemGetTypeID;
7use std::fmt;
8
9declare_TCFType! {
10    /// A type representing a keychain item.
11    SecKeychainItem, SecKeychainItemRef
12}
13impl_TCFType!(
14    SecKeychainItem,
15    SecKeychainItemRef,
16    SecKeychainItemGetTypeID
17);
18
19unsafe impl Sync for SecKeychainItem {}
20unsafe impl Send for SecKeychainItem {}
21
22impl fmt::Debug for SecKeychainItem {
23    #[cold]
24    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
25        fmt.debug_struct("SecKeychainItem").finish_non_exhaustive()
26    }
27}