objc2_contacts/generated/
CNContactsUserDefaults.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// The user defaults for contacts.
11    ///
12    ///
13    /// Note: This class is not thread safe.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/contacts/cncontactsuserdefaults?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct CNContactsUserDefaults;
19);
20
21unsafe impl NSObjectProtocol for CNContactsUserDefaults {}
22
23impl CNContactsUserDefaults {
24    extern_methods!(
25        #[unsafe(method(sharedDefaults))]
26        #[unsafe(method_family = none)]
27        pub unsafe fn sharedDefaults() -> Retained<Self>;
28
29        #[cfg(feature = "CNContact")]
30        #[unsafe(method(sortOrder))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn sortOrder(&self) -> CNContactSortOrder;
33
34        #[unsafe(method(countryCode))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn countryCode(&self) -> Retained<NSString>;
37    );
38}
39
40/// Methods declared on superclass `NSObject`.
41impl CNContactsUserDefaults {
42    extern_methods!(
43        #[unsafe(method(init))]
44        #[unsafe(method_family = init)]
45        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
46
47        #[unsafe(method(new))]
48        #[unsafe(method_family = new)]
49        pub unsafe fn new() -> Retained<Self>;
50    );
51}