struct IndexConst<T: ?Sized>(T);Expand description
Since Index and IndexMut aren’t callable in const contexts yet, this helper type helps unify
arrays and user-defined array-wrapper types into a single type which can be indexed in const
contexts. Once const traits are stabilized this type can go away
Tuple Fields§
§0: TImplementations§
Source§impl<'a, T, const N: usize> IndexConst<&'a [T; N]>
impl<'a, T, const N: usize> IndexConst<&'a [T; N]>
Source§impl<'a, 'b, T, const N: usize> IndexConst<&'a mut &'b mut [T; N]>
impl<'a, 'b, T, const N: usize> IndexConst<&'a mut &'b mut [T; N]>
Source§impl<'a> IndexConst<&'a fiat_p521_tight_field_element>
impl<'a> IndexConst<&'a fiat_p521_tight_field_element>
Source§impl<'a, 'b> IndexConst<&'a mut &'b mut fiat_p521_tight_field_element>
impl<'a, 'b> IndexConst<&'a mut &'b mut fiat_p521_tight_field_element>
Source§impl<'a> IndexConst<&'a fiat_p521_loose_field_element>
impl<'a> IndexConst<&'a fiat_p521_loose_field_element>
Source§impl<'a, 'b> IndexConst<&'a mut &'b mut fiat_p521_loose_field_element>
impl<'a, 'b> IndexConst<&'a mut &'b mut fiat_p521_loose_field_element>
Auto Trait Implementations§
impl<T> Freeze for IndexConst<T>
impl<T> RefUnwindSafe for IndexConst<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for IndexConst<T>
impl<T> Sync for IndexConst<T>
impl<T> Unpin for IndexConst<T>
impl<T> UnsafeUnpin for IndexConst<T>where
T: UnsafeUnpin + ?Sized,
impl<T> UnwindSafe for IndexConst<T>where
T: UnwindSafe + ?Sized,
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