Trait array_trait::Array

source ·
pub trait Array: Array + Sized + IntoIterator + AsRef<[Self::Item]> + AsMut<[Self::Item]> + Borrow<[Self::Item]> + BorrowMut<[Self::Item]> + Index<usize, Output = <[Self::Item] as Index<usize>>::Output> + Index<Range<usize>, Output = <[Self::Item] as Index<Range<usize>>>::Output> + Index<RangeInclusive<usize>, Output = <[Self::Item] as Index<RangeInclusive<usize>>>::Output> + Index<RangeFrom<usize>, Output = <[Self::Item] as Index<RangeFrom<usize>>>::Output> + Index<RangeTo<usize>, Output = <[Self::Item] as Index<RangeTo<usize>>>::Output> + Index<RangeToInclusive<usize>, Output = <[Self::Item] as Index<RangeToInclusive<usize>>>::Output> + Index<RangeFull, Output = <[Self::Item] as Index<RangeFull>>::Output> + IndexMut<usize> + IndexMut<Range<usize>> + IndexMut<RangeInclusive<usize>> + IndexMut<RangeFrom<usize>> + IndexMut<RangeTo<usize>> + IndexMut<RangeToInclusive<usize>> + IndexMut<RangeFull> {
    const LENGTH: usize;

    // Required methods
    fn into_array(self) -> [Self::Item; Self::LENGTH];
    fn as_array(&self) -> &[Self::Item; Self::LENGTH];
    fn as_array_mut(&mut self) -> &mut [Self::Item; Self::LENGTH];

    // Provided methods
    fn split_array<const M: usize>(
        self
    ) -> ([Self::Item; M], [Self::Item; { _ }]) { ... }
    fn split_array_ref2<const M: usize>(
        &self
    ) -> (&[Self::Item; M], &[Self::Item; { _ }]) { ... }
    fn split_array_mut2<const M: usize>(
        &mut self
    ) -> (&mut [Self::Item; M], &mut [Self::Item; { _ }]) { ... }
    fn rsplit_array_ref2<const M: usize>(
        &self
    ) -> (&[Self::Item; { _ }], &[Self::Item; M]) { ... }
    fn rsplit_array_mut2<const M: usize>(
        &mut self
    ) -> (&mut [Self::Item; { _ }], &mut [Self::Item; M]) { ... }
}

Required Associated Constants§

Required Methods§

source

fn into_array(self) -> [Self::Item; Self::LENGTH]

source

fn as_array(&self) -> &[Self::Item; Self::LENGTH]

source

fn as_array_mut(&mut self) -> &mut [Self::Item; Self::LENGTH]

Provided Methods§

source

fn split_array<const M: usize>(self) -> ([Self::Item; M], [Self::Item; { _ }])

source

fn split_array_ref2<const M: usize>( &self ) -> (&[Self::Item; M], &[Self::Item; { _ }])

source

fn split_array_mut2<const M: usize>( &mut self ) -> (&mut [Self::Item; M], &mut [Self::Item; { _ }])

source

fn rsplit_array_ref2<const M: usize>( &self ) -> (&[Self::Item; { _ }], &[Self::Item; M])

source

fn rsplit_array_mut2<const M: usize>( &mut self ) -> (&mut [Self::Item; { _ }], &mut [Self::Item; M])

Implementations on Foreign Types§

source§

impl<Item, const LENGTH: usize> Array for [Item; LENGTH]

Implementors§