pub struct HierName(pub Vec<CompactString>);Expand description
Hierarchical name.
Unlike the NetlistDB’s tree-like structure, this one adopts a simple Vec.
Tuple Fields§
§0: Vec<CompactString>Implementations§
Trait Implementations§
Source§impl Hash for HierName
Hashing a HierName.
impl Hash for HierName
Hashing a HierName.
Our guarantee here is that
Hash(HierName[a/b/c]) :== Hash(c, b, a).
This is essential for different HierName implementations to agree with each other on hash values. Especially, to conform with NetlistDB’s implementation.
For example, we have a Vec here in SPEF parser’s
HierName implementation, but we cannot use derived Hash
on it. – because hash of a Vec is the same as a slice,
which not only prefixes the hash with a length parameter,
but also hashes it forward instead of backward.
Thus we implement it by ourselves.
Source§impl<'i> IntoIterator for &'i HierName
impl<'i> IntoIterator for &'i HierName
impl Eq for HierName
impl StructuralPartialEq for HierName
Auto Trait Implementations§
impl Freeze for HierName
impl RefUnwindSafe for HierName
impl Send for HierName
impl Sync for HierName
impl Unpin for HierName
impl UnwindSafe for HierName
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<I, C> CompactStringExt for C
impl<I, C> CompactStringExt for C
Source§fn concat_compact(&self) -> CompactString
fn concat_compact(&self) -> CompactString
Concatenates all the items of a collection into a
CompactString Read moreSource§fn join_compact<S>(&self, seperator: S) -> CompactString
fn join_compact<S>(&self, seperator: S) -> CompactString
Joins all the items of a collection, placing a seperator between them, forming a
CompactString Read moreSource§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more