Struct mcircuit::parsers::WireHasher
source · [−]pub struct WireHasher { /* private fields */ }
Expand description
Calculates and remembers sequential hashes of wire names. For example:
use mcircuit::parsers::WireHasher;
let mut hasher = WireHasher::default();
assert_eq!(hasher.get_wire_id("foo"), 0);
assert_eq!(hasher.get_wire_id("bar"), 1);
assert_eq!(hasher.get_wire_id("baz"), 2);
assert_eq!(hasher.get_wire_id("foo"), 0);
assert_eq!(hasher.get_wire_id("baz"), 2);
Implementations
sourceimpl WireHasher
impl WireHasher
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for WireHasher
impl Send for WireHasher
impl Sync for WireHasher
impl Unpin for WireHasher
impl UnwindSafe for WireHasher
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more