Struct ArraySeq

Source
pub struct ArraySeq<T, const N: usize> { /* private fields */ }

Trait Implementations§

Source§

impl<T, const N: usize> Sequence for ArraySeq<T, N>
where Const<N>: ToUInt,

Source§

type Item = T

Source§

type Iter = IntoIter<T, N>

Source§

type MinSize = StaticSize<<Const<N> as ToUInt>::Output>

The minimum size of the sequence. Read more
Source§

type MaxSize = StaticSize<<Const<N> as ToUInt>::Output>

The maximum size of the sequence. Read more
Source§

fn into_iter(self) -> Self::Iter

Converts this sequence into a (stateful) iterator.
Source§

fn min_size(&self) -> SizeKind

Returns the minimum size of the sequence. Read more
Source§

fn max_size(&self) -> SizeKind

Returns the maximum size of the sequence. Read more
Source§

const MIN_SIZE: Option<SizeKind> = <Self::MinSize>::STATIC_SIZE

Source§

const MAX_SIZE: Option<SizeKind> = <Self::MaxSize>::STATIC_SIZE

Source§

fn collect_array<const N: usize>(self) -> [Self::Item; N]
where Self: Sized + WithLowerBound<N>, Const<N>: ToUInt,

Collects this sequence’s elements into an array.
Source§

fn collect_array_in_place<const N: usize>( self, out: &mut MaybeUninit<[Self::Item; N]>, )
where Self: Sized + WithLowerBound<N>, Const<N>: ToUInt,

Collects this sequence’s elements into an array in place.
Source§

fn map<F, B>(self, f: F) -> Map<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> B,

Returns a new sequence that transforms every element of the original sequence using f.
Source§

fn flat_map<F, U>(self, f: F) -> FlatMap<Self, F>
where Self: Sized, U: Sequence, F: FnMut(Self::Item) -> U,

Returns a new sequence that transforms every element of the original sequence by calling f and then “flattening” the result.
Source§

fn flatten<U>(self) -> Flatten<Self>
where Self: Sequence<Item = U> + Sized, U: Sequence,

“Flattens” the sequence by removing one nesting layer.
Source§

fn enumerate(self) -> Enumerate<Self>
where Self: Sized,

Returns a new sequence that yields the current iteration index together with every element.
Source§

fn take_exact_stn<N: Unsigned>(self) -> TakeExactSTn<Self, N>
where Self: Sized,

Returns a new sequence that always yields the first exactly N elements.
Source§

fn take_exact_s<const N: usize>(self) -> TakeExactS<Self, N>
where Self: Sized, Const<N>: ToUInt,

Returns a new sequence that always yields the first exactly N elements.

Auto Trait Implementations§

§

impl<T, const N: usize> Freeze for ArraySeq<T, N>
where T: Freeze,

§

impl<T, const N: usize> RefUnwindSafe for ArraySeq<T, N>
where T: RefUnwindSafe,

§

impl<T, const N: usize> Send for ArraySeq<T, N>
where T: Send,

§

impl<T, const N: usize> Sync for ArraySeq<T, N>
where T: Sync,

§

impl<T, const N: usize> Unpin for ArraySeq<T, N>
where T: Unpin,

§

impl<T, const N: usize> UnwindSafe for ArraySeq<T, N>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, const N: usize> WithLowerBound<N> for S
where S: LowerBound<<Const<N> as ToUInt>::Output>, Const<N>: ToUInt,

Source§

impl<S, const N: usize> WithUpperBound<N> for S
where S: UpperBound<<Const<N> as ToUInt>::Output>, Const<N>: ToUInt,