acme_tensor/seal.rs
1/*
2 Appellation: seal <mod>
3 Contrib: FL03 <jo3mccain@icloud.com>
4*/
5//! The public parts of this private module are used to create traits
6//! that cannot be implemented outside of our own crate. This way we
7//! can feel free to extend those traits without worrying about it
8//! being a breaking change for other implementations.
9
10/// If this type is pub but not publicly reachable, third parties
11/// can't name it and can't implement traits using it.
12pub struct PrivateMarker;
13
14macro_rules! private_decl {
15 () => {
16 /// This trait is private to implement; this method exists to make it
17 /// impossible to implement outside the crate.
18 #[doc(hidden)]
19 fn __private__(&self) -> $crate::seal::PrivateMarker;
20 };
21}
22
23macro_rules! private_impl {
24 () => {
25 fn __private__(&self) -> $crate::seal::PrivateMarker {
26 $crate::seal::PrivateMarker
27 }
28 };
29}