objc2_foundation/generated/
NSClassDescription.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct NSClassDescription;
14);
15
16unsafe impl NSObjectProtocol for NSClassDescription {}
17
18impl NSClassDescription {
19 extern_methods!(
20 #[unsafe(method(registerClassDescription:forClass:))]
21 #[unsafe(method_family = none)]
22 pub unsafe fn registerClassDescription_forClass(
23 description: &NSClassDescription,
24 a_class: &AnyClass,
25 );
26
27 #[unsafe(method(invalidateClassDescriptionCache))]
28 #[unsafe(method_family = none)]
29 pub unsafe fn invalidateClassDescriptionCache();
30
31 #[unsafe(method(classDescriptionForClass:))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn classDescriptionForClass(
34 a_class: &AnyClass,
35 ) -> Option<Retained<NSClassDescription>>;
36
37 #[cfg(all(feature = "NSArray", feature = "NSString"))]
38 #[unsafe(method(attributeKeys))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn attributeKeys(&self) -> Retained<NSArray<NSString>>;
41
42 #[cfg(all(feature = "NSArray", feature = "NSString"))]
43 #[unsafe(method(toOneRelationshipKeys))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn toOneRelationshipKeys(&self) -> Retained<NSArray<NSString>>;
46
47 #[cfg(all(feature = "NSArray", feature = "NSString"))]
48 #[unsafe(method(toManyRelationshipKeys))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn toManyRelationshipKeys(&self) -> Retained<NSArray<NSString>>;
51
52 #[cfg(feature = "NSString")]
53 #[unsafe(method(inverseForRelationshipKey:))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn inverseForRelationshipKey(
56 &self,
57 relationship_key: &NSString,
58 ) -> Option<Retained<NSString>>;
59 );
60}
61
62impl NSClassDescription {
64 extern_methods!(
65 #[unsafe(method(init))]
66 #[unsafe(method_family = init)]
67 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
68
69 #[unsafe(method(new))]
70 #[unsafe(method_family = new)]
71 pub unsafe fn new() -> Retained<Self>;
72 );
73}
74
75mod private_NSObjectNSClassDescriptionPrimitives {
76 pub trait Sealed {}
77}
78
79#[doc(alias = "NSClassDescriptionPrimitives")]
81pub unsafe trait NSObjectNSClassDescriptionPrimitives:
82 ClassType + Sized + private_NSObjectNSClassDescriptionPrimitives::Sealed
83{
84 extern_methods!(
85 #[unsafe(method(classDescription))]
86 #[unsafe(method_family = none)]
87 unsafe fn classDescription(&self) -> Retained<NSClassDescription>;
88
89 #[cfg(all(feature = "NSArray", feature = "NSString"))]
90 #[unsafe(method(attributeKeys))]
91 #[unsafe(method_family = none)]
92 unsafe fn attributeKeys(&self) -> Retained<NSArray<NSString>>;
93
94 #[cfg(all(feature = "NSArray", feature = "NSString"))]
95 #[unsafe(method(toOneRelationshipKeys))]
96 #[unsafe(method_family = none)]
97 unsafe fn toOneRelationshipKeys(&self) -> Retained<NSArray<NSString>>;
98
99 #[cfg(all(feature = "NSArray", feature = "NSString"))]
100 #[unsafe(method(toManyRelationshipKeys))]
101 #[unsafe(method_family = none)]
102 unsafe fn toManyRelationshipKeys(&self) -> Retained<NSArray<NSString>>;
103
104 #[cfg(feature = "NSString")]
105 #[unsafe(method(inverseForRelationshipKey:))]
106 #[unsafe(method_family = none)]
107 unsafe fn inverseForRelationshipKey(
108 &self,
109 relationship_key: &NSString,
110 ) -> Option<Retained<NSString>>;
111 );
112}
113
114impl private_NSObjectNSClassDescriptionPrimitives::Sealed for NSObject {}
115unsafe impl NSObjectNSClassDescriptionPrimitives for NSObject {}
116
117extern "C" {
118 #[cfg(all(feature = "NSNotification", feature = "NSString"))]
120 pub static NSClassDescriptionNeededForClassNotification: &'static NSNotificationName;
121}