pub struct NonZeroId(/* private fields */);
Expand description
A non-zero Id which definitely contains a value. We keep this distinct
from Id
to allow for safely using this as a key in a hashmap, preventing
us from inadvertently storing an empty identifier.
Trait Implementations§
source§impl From<NonZero<u32>> for NonZeroId
impl From<NonZero<u32>> for NonZeroId
source§fn from(value: NonZeroU32) -> Self
fn from(value: NonZeroU32) -> Self
Converts to this type from the input type.
source§impl PartialEq for NonZeroId
impl PartialEq for NonZeroId
impl Copy for NonZeroId
impl Eq for NonZeroId
impl StructuralPartialEq for NonZeroId
Auto Trait Implementations§
impl RefUnwindSafe for NonZeroId
impl Send for NonZeroId
impl Sync for NonZeroId
impl Unpin for NonZeroId
impl UnwindSafe for NonZeroId
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§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.