netlist_db/
_impl_hash.rs

1use crate::Subckt;
2use core::hash::Hash;
3use std::borrow::Borrow;
4
5impl Hash for Subckt<'_> {
6    fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
7        self.name.hash(state);
8    }
9}
10
11impl PartialEq for Subckt<'_> {
12    fn eq(&self, other: &Self) -> bool {
13        self.name == other.name
14    }
15}
16
17impl Eq for Subckt<'_> {}
18
19impl Borrow<str> for Subckt<'_> {
20    fn borrow(&self) -> &str {
21        &self.name
22    }
23}