libreda_db/
traits.rs

1// Copyright (c) 2020-2021 Thomas Kramer.
2// SPDX-FileCopyrightText: 2022 Thomas Kramer
3//
4// SPDX-License-Identifier: AGPL-3.0-or-later
5
6//! Re-export all traits defined in this crate.
7
8pub use crate::hierarchy::traits::*;
9pub use crate::l2n::*;
10pub use crate::layout::traits::*;
11pub use crate::netlist::traits::*;
12
13/// Trait used for identifier types.
14pub trait IdType: std::fmt::Debug + Clone + Eq + std::hash::Hash + 'static {}
15
16impl<T> IdType for T where T: std::fmt::Debug + Clone + Eq + std::hash::Hash + 'static {}
17
18/// Traid used for thread-safe.
19pub trait IdTypeMT: IdType + Sync + Send {}
20
21impl<T> IdTypeMT for T where T: IdType + Sync + Send {}