pub struct DuplicateKey<K, const N: usize> { /* private fields */ }Expand description
One duplicated key and every declaration position at which it occurred.
Implementations§
Source§impl<K, const N: usize> DuplicateKey<K, N>
impl<K, const N: usize> DuplicateKey<K, N>
Sourcepub const fn first_position(&self) -> usize
pub const fn first_position(&self) -> usize
The zero-based declaration position of the first occurrence.
Sourcepub const fn repeated_positions(&self) -> &NonEmpty<usize, N>
pub const fn repeated_positions(&self) -> &NonEmpty<usize, N>
The zero-based declaration positions of every later occurrence.
Trait Implementations§
Source§impl<K: Clone, const N: usize> Clone for DuplicateKey<K, N>
impl<K: Clone, const N: usize> Clone for DuplicateKey<K, N>
Source§fn clone(&self) -> DuplicateKey<K, N>
fn clone(&self) -> DuplicateKey<K, N>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<K: Eq, const N: usize> Eq for DuplicateKey<K, N>
impl<K: PartialEq, const N: usize> StructuralPartialEq for DuplicateKey<K, N>
Auto Trait Implementations§
impl<K, const N: usize> Freeze for DuplicateKey<K, N>
impl<K, const N: usize> RefUnwindSafe for DuplicateKey<K, N>
impl<K, const N: usize> Send for DuplicateKey<K, N>
impl<K, const N: usize> Sync for DuplicateKey<K, N>
impl<K, const N: usize> Unpin for DuplicateKey<K, N>
impl<K, const N: usize> UnsafeUnpin for DuplicateKey<K, N>
impl<K, const N: usize> UnwindSafe for DuplicateKey<K, N>
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