objc2_contacts/generated/
CNPhoneNumber.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct CNPhoneNumber;
19);
20
21extern_conformance!(
22 unsafe impl NSCoding for CNPhoneNumber {}
23);
24
25extern_conformance!(
26 unsafe impl NSCopying for CNPhoneNumber {}
27);
28
29unsafe impl CopyingHelper for CNPhoneNumber {
30 type Result = Self;
31}
32
33extern_conformance!(
34 unsafe impl NSObjectProtocol for CNPhoneNumber {}
35);
36
37extern_conformance!(
38 unsafe impl NSSecureCoding for CNPhoneNumber {}
39);
40
41impl CNPhoneNumber {
42 extern_methods!(
43 #[unsafe(method(phoneNumberWithStringValue:))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn phoneNumberWithStringValue(string_value: &NSString)
47 -> Option<Retained<Self>>;
48
49 #[unsafe(method(initWithStringValue:))]
50 #[unsafe(method_family = init)]
51 pub unsafe fn initWithStringValue(
52 this: Allocated<Self>,
53 string: &NSString,
54 ) -> Retained<CNPhoneNumber>;
55
56 #[deprecated = "Use initWithStringValue:"]
57 #[unsafe(method(init))]
58 #[unsafe(method_family = init)]
59 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
60
61 #[deprecated = "Use phoneNumberWithStringValue:"]
62 #[unsafe(method(new))]
63 #[unsafe(method_family = new)]
64 pub unsafe fn new() -> Retained<Self>;
65
66 #[unsafe(method(stringValue))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn stringValue(&self) -> Retained<NSString>;
69 );
70}
71
72extern "C" {
73 pub static CNLabelPhoneNumberiPhone: &'static NSString;
75}
76
77extern "C" {
78 pub static CNLabelPhoneNumberAppleWatch: &'static NSString;
80}
81
82extern "C" {
83 pub static CNLabelPhoneNumberMobile: &'static NSString;
85}
86
87extern "C" {
88 pub static CNLabelPhoneNumberMain: &'static NSString;
90}
91
92extern "C" {
93 pub static CNLabelPhoneNumberHomeFax: &'static NSString;
95}
96
97extern "C" {
98 pub static CNLabelPhoneNumberWorkFax: &'static NSString;
100}
101
102extern "C" {
103 pub static CNLabelPhoneNumberOtherFax: &'static NSString;
105}
106
107extern "C" {
108 pub static CNLabelPhoneNumberPager: &'static NSString;
110}