]>
Commit | Line | Data |
---|---|---|
2c00a5a8 XL |
1 | //! The public parts of this private module are used to create traits |
2 | //! that cannot be implemented outside of our own crate. This way we | |
3 | //! can feel free to extend those traits without worrying about it | |
4 | //! being a breaking change for other implementations. | |
5 | ||
2c00a5a8 XL |
6 | /// If this type is pub but not publicly reachable, third parties |
7 | /// can't name it and can't implement traits using it. | |
8 | #[allow(missing_debug_implementations)] | |
9 | pub struct PrivateMarker; | |
10 | ||
11 | macro_rules! private_decl { | |
12 | () => { | |
13 | /// This trait is private; this method exists to make it | |
14 | /// impossible to implement outside the crate. | |
15 | #[doc(hidden)] | |
72b1a166 FG |
16 | fn __rayon_private__(&self) -> crate::private::PrivateMarker; |
17 | }; | |
2c00a5a8 XL |
18 | } |
19 | ||
20 | macro_rules! private_impl { | |
21 | () => { | |
72b1a166 FG |
22 | fn __rayon_private__(&self) -> crate::private::PrivateMarker { |
23 | crate::private::PrivateMarker | |
2c00a5a8 | 24 | } |
72b1a166 | 25 | }; |
2c00a5a8 | 26 | } |