pub struct Uniq(pub Arc<str>);Expand description
Debugging unique identifier helper.
Construction via Uniq::default() will always result in the same
“node_id” unique to this process, as well as an incrementing counter.
Construction via Uniq::fresh() will result in a new random
“node_id” as well as an incrementing counter.
Uniq::default() -> "12MUNeh3:1"
Uniq::default() -> "12MUNeh3:2"
Uniq::fresh() -> "RV1bMaCM:3"
Uniq::fresh() -> "3psHcLKE:4"
Tuple Fields§
§0: Arc<str>Implementations§
Trait Implementations§
source§impl Ord for Uniq
impl Ord for Uniq
source§impl PartialEq<Uniq> for Uniq
impl PartialEq<Uniq> for Uniq
source§impl PartialOrd<Uniq> for Uniq
impl PartialOrd<Uniq> for Uniq
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Uniq
impl StructuralEq for Uniq
impl StructuralPartialEq for Uniq
Auto Trait Implementations§
impl RefUnwindSafe for Uniq
impl Send for Uniq
impl Sync for Uniq
impl Unpin for Uniq
impl UnwindSafe for Uniq
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.