objc2_contacts/generated/
CNGroup.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    /// An immutable value object representing a group.
11    ///
12    ///
13    /// CNGroup is thread safe.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/contacts/cngroup?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct CNGroup;
19);
20
21unsafe impl NSCoding for CNGroup {}
22
23unsafe impl NSCopying for CNGroup {}
24
25unsafe impl CopyingHelper for CNGroup {
26    type Result = Self;
27}
28
29unsafe impl NSMutableCopying for CNGroup {}
30
31#[cfg(feature = "CNMutableGroup")]
32unsafe impl MutableCopyingHelper for CNGroup {
33    type Result = CNMutableGroup;
34}
35
36unsafe impl NSObjectProtocol for CNGroup {}
37
38unsafe impl NSSecureCoding for CNGroup {}
39
40impl CNGroup {
41    extern_methods!(
42        /// The identifier is unique among groups on the device. It can be saved and used for fetching groups next application launch.
43        #[unsafe(method(identifier))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn identifier(&self) -> Retained<NSString>;
46
47        #[unsafe(method(name))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn name(&self) -> Retained<NSString>;
50    );
51}
52
53/// Methods declared on superclass `NSObject`.
54impl CNGroup {
55    extern_methods!(
56        #[unsafe(method(init))]
57        #[unsafe(method_family = init)]
58        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
59
60        #[unsafe(method(new))]
61        #[unsafe(method_family = new)]
62        pub unsafe fn new() -> Retained<Self>;
63    );
64}
65
66extern "C" {
67    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cngroupidentifierkey?language=objc)
68    pub static CNGroupIdentifierKey: &'static NSString;
69}
70
71extern "C" {
72    /// [Apple's documentation](https://developer.apple.com/documentation/contacts/cngroupnamekey?language=objc)
73    pub static CNGroupNameKey: &'static NSString;
74}