1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// SPDX-FileCopyrightText: 2023 Thomas Kramer
//
// SPDX-License-Identifier: AGPL-3.0-or-later

//! Blanket implementations of hierarchy traits for reference types, `Rc`, `Arc` and `Box`.

//use super::traits::*;
//use std::rc::Rc;
//use std::sync::Arc;
//
//macro_rules! blanket {
//    ($type:ty, $trait:ident) => {
//        #[portrait::fill(portrait::delegate(T; *self))]
//        impl<T> $trait for $type where T: $trait {}
//    };
//}
//
//macro_rules! blanket_ids {
//    ($type:ty, $trait:ident) => {
//        #[portrait::fill(portrait::delegate(T))]
//        impl<T> $trait for $type where T: $trait {}
//    };
//}
//
//macro_rules! blanket_id_impls {
//    ($trait:ident) => {
//        blanket_ids!(&T, $trait);
//        blanket_ids!(&mut T, $trait);
//        blanket_ids!(Rc<T>, $trait);
//        blanket_ids!(Arc<T>, $trait);
//        blanket_ids!(Box<T>, $trait);
//    };
//}
//
//macro_rules! blanket_impls {
//    ($trait:ident) => {
//        blanket!(&T, $trait);
//        blanket!(&mut T, $trait);
//        blanket!(Rc<T>, $trait);
//        blanket!(Arc<T>, $trait);
//        blanket!(Box<T>, $trait);
//    };
//}
//
//macro_rules! blanket_impls_mut {
//    ($trait:ident) => {
//        //blanket!(&T, $trait);
//        blanket!(&mut T, $trait);
//        //blanket!(Rc<T>, $trait);
//        //blanket!(Arc<T>, $trait);
//        blanket!(Box<T>, $trait);
//    };
//}
//
//blanket_id_impls!(HierarchyIds);
//blanket_impls!(HierarchyBase);
//blanket_impls_mut!(HierarchyEdit);
//
//blanket_id_impls!(NetlistIds);
//blanket_impls!(NetlistBase);
//blanket_impls_mut!(NetlistEdit);
//
//blanket_id_impls!(LayoutIds);
//blanket_impls!(LayoutBase);
//blanket_impls_mut!(LayoutEdit);
//
//blanket_impls!(L2NBase);
//blanket_impls_mut!(L2NEdit);
//