|
3 | 3 | /// This is similar to an `@interface` declaration in Objective-C. |
4 | 4 | /// |
5 | 5 | /// The given struct name should correspond to a valid Objective-C class, |
6 | | -/// whose instances have the encoding [`objc2::Encoding::Object`]. |
7 | | -/// (as an example: `NSAutoreleasePool` does not have this!) |
| 6 | +/// whose instances have the encoding [`Encoding::Object`]. (as an example: |
| 7 | +/// `NSAutoreleasePool` does not have this!) |
8 | 8 | /// |
9 | 9 | /// You must specify the superclass of this class, similar to how you would |
10 | 10 | /// in Objective-C. Due to Rust trait limitations, specifying e.g. the |
11 | 11 | /// superclass `NSData` would not give you easy access to `NSObject`'s |
12 | 12 | /// functionality, therefore you may specify additional parts of the |
13 | 13 | /// inheritance chain. |
14 | 14 | /// |
| 15 | +/// [`Encoding::Object`]: crate::Encoding::Object |
| 16 | +/// |
15 | 17 | /// |
16 | 18 | /// # Specification |
17 | 19 | /// |
18 | 20 | /// This creates an opaque struct containing the superclass (which means that |
19 | 21 | /// auto traits are inherited from the superclass), and implements the |
20 | 22 | /// following traits for it to allow easier usage as an Objective-C object: |
21 | 23 | /// |
22 | | -/// - [`objc2::RefEncode`] |
23 | | -/// - [`objc2::Message`] |
| 24 | +/// - [`RefEncode`][crate::RefEncode] |
| 25 | +/// - [`Message`][crate::Message] |
24 | 26 | /// - [`Deref<Target = $superclass>`][core::ops::Deref] |
25 | 27 | /// - [`DerefMut`][core::ops::DerefMut] |
26 | 28 | /// - [`AsRef<$inheritance_chain>`][AsRef] |
|
33 | 35 | /// `class!(MyObject)`. |
34 | 36 | /// |
35 | 37 | /// The macro allows specifying fields on the struct, but _only_ zero-sized |
36 | | -/// types like [`PhantomData`] and [`objc2::declare::Ivar`] are allowed here! |
| 38 | +/// types like [`PhantomData`] and [`declare::Ivar`] are allowed here! |
37 | 39 | /// |
38 | 40 | /// [`PhantomData`]: core::marker::PhantomData |
| 41 | +/// [`declare::Ivar`]: crate::declare::Ivar |
39 | 42 | /// |
40 | 43 | /// |
41 | 44 | /// # Safety |
42 | 45 | /// |
43 | 46 | /// The specified superclass must be correct. The object must also respond to |
44 | | -/// standard memory management messages (this is upheld if `NSObject` is part |
45 | | -/// of its inheritance chain). |
| 47 | +/// standard memory management messages (this is upheld if [`NSObject`] is |
| 48 | +/// part of its inheritance chain). |
46 | 49 | /// |
47 | 50 | /// Additionally, any fields (if specified) must be zero-sized. |
48 | 51 | /// |
| 52 | +/// [`NSObject`]: crate::foundation::NSObject |
| 53 | +/// |
49 | 54 | /// |
50 | 55 | /// # Example |
51 | 56 | /// |
|
0 commit comments