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
16extern_conformance!(
17 unsafe impl NSObjectProtocol for NSClassDescription {}
18);
19
20impl NSClassDescription {
21 extern_methods!(
22 #[unsafe(method(registerClassDescription:forClass:))]
23 #[unsafe(method_family = none)]
24 pub unsafe fn registerClassDescription_forClass(
25 description: &NSClassDescription,
26 a_class: &AnyClass,
27 );
28
29 #[unsafe(method(invalidateClassDescriptionCache))]
30 #[unsafe(method_family = none)]
31 pub unsafe fn invalidateClassDescriptionCache();
32
33 #[unsafe(method(classDescriptionForClass:))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn classDescriptionForClass(
36 a_class: &AnyClass,
37 ) -> Option<Retained<NSClassDescription>>;
38
39 #[cfg(all(feature = "NSArray", feature = "NSString"))]
40 #[unsafe(method(attributeKeys))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn attributeKeys(&self) -> Retained<NSArray<NSString>>;
43
44 #[cfg(all(feature = "NSArray", feature = "NSString"))]
45 #[unsafe(method(toOneRelationshipKeys))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn toOneRelationshipKeys(&self) -> Retained<NSArray<NSString>>;
48
49 #[cfg(all(feature = "NSArray", feature = "NSString"))]
50 #[unsafe(method(toManyRelationshipKeys))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn toManyRelationshipKeys(&self) -> Retained<NSArray<NSString>>;
53
54 #[cfg(feature = "NSString")]
55 #[unsafe(method(inverseForRelationshipKey:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn inverseForRelationshipKey(
58 &self,
59 relationship_key: &NSString,
60 ) -> Option<Retained<NSString>>;
61 );
62}
63
64impl NSClassDescription {
66 extern_methods!(
67 #[unsafe(method(init))]
68 #[unsafe(method_family = init)]
69 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
70
71 #[unsafe(method(new))]
72 #[unsafe(method_family = new)]
73 pub unsafe fn new() -> Retained<Self>;
74 );
75}
76
77mod private_NSObjectNSClassDescriptionPrimitives {
78 pub trait Sealed {}
79}
80
81#[doc(alias = "NSClassDescriptionPrimitives")]
83pub unsafe trait NSObjectNSClassDescriptionPrimitives:
84 ClassType + Sized + private_NSObjectNSClassDescriptionPrimitives::Sealed
85{
86 extern_methods!(
87 #[unsafe(method(classDescription))]
88 #[unsafe(method_family = none)]
89 unsafe fn classDescription(&self) -> Retained<NSClassDescription>;
90
91 #[cfg(all(feature = "NSArray", feature = "NSString"))]
92 #[unsafe(method(attributeKeys))]
93 #[unsafe(method_family = none)]
94 unsafe fn attributeKeys(&self) -> Retained<NSArray<NSString>>;
95
96 #[cfg(all(feature = "NSArray", feature = "NSString"))]
97 #[unsafe(method(toOneRelationshipKeys))]
98 #[unsafe(method_family = none)]
99 unsafe fn toOneRelationshipKeys(&self) -> Retained<NSArray<NSString>>;
100
101 #[cfg(all(feature = "NSArray", feature = "NSString"))]
102 #[unsafe(method(toManyRelationshipKeys))]
103 #[unsafe(method_family = none)]
104 unsafe fn toManyRelationshipKeys(&self) -> Retained<NSArray<NSString>>;
105
106 #[cfg(feature = "NSString")]
107 #[unsafe(method(inverseForRelationshipKey:))]
108 #[unsafe(method_family = none)]
109 unsafe fn inverseForRelationshipKey(
110 &self,
111 relationship_key: &NSString,
112 ) -> Option<Retained<NSString>>;
113 );
114}
115
116impl private_NSObjectNSClassDescriptionPrimitives::Sealed for NSObject {}
117unsafe impl NSObjectNSClassDescriptionPrimitives for NSObject {}
118
119extern "C" {
120 #[cfg(all(feature = "NSNotification", feature = "NSString"))]
122 pub static NSClassDescriptionNeededForClassNotification: &'static NSNotificationName;
123}