pub struct ArrayMap<K: Indexed, T, const N: usize>(/* private fields */);Expand description
Implementations§
Source§impl<K, T, const N: usize> ArrayMap<K, T, N>where
K: Indexed,
impl<K, T, const N: usize> ArrayMap<K, T, N>where
K: Indexed,
Sourcepub const fn new(values: [T; N]) -> Self
pub const fn new(values: [T; N]) -> Self
Creates storage when values are already arranged in Indexed order.
Sourcepub fn iter(&self) -> impl Iterator<Item = (K, &T)>
pub fn iter(&self) -> impl Iterator<Item = (K, &T)>
Iterates in schema order when every key needs its decoded value.
Sourcepub fn into_inner(self) -> [T; N]
pub fn into_inner(self) -> [T; N]
Returns the array when a fixed-size consumer no longer needs typed keys.
Trait Implementations§
impl<K: PartialEq + Indexed, T: PartialEq, const N: usize> StructuralPartialEq for ArrayMap<K, T, N>
Auto Trait Implementations§
impl<K, T, const N: usize> Forget for ArrayMap<K, T, N>
impl<K, T, const N: usize> Freeze for ArrayMap<K, T, N>
impl<K, T, const N: usize> Move for ArrayMap<K, T, N>
impl<K, T, const N: usize> RefUnwindSafe for ArrayMap<K, T, N>
impl<K, T, const N: usize> Send for ArrayMap<K, T, N>
impl<K, T, const N: usize> Sync for ArrayMap<K, T, N>
impl<K, T, const N: usize> Unpin for ArrayMap<K, T, N>
impl<K, T, const N: usize> UnsafeUnpin for ArrayMap<K, T, N>
impl<K, T, const N: usize> UnwindSafe for ArrayMap<K, T, 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