Enum collect_array::CollectArrayResult [−][src]
The result of collecting an Iterator into an exactly-sized array, or having failed to.
More than N elements may be consumed from the Iterator - if this is undesirable, consider
calling Iterator
before collecting.
Variants
Returned if the Iterator contained exactly N elements.
Returned if the Iterator contained more than N elements. The underlying Iterator may not be exhausted, and remaining values may not be accessible.
Fields of TooManyElements
Returned if the Iterator contained fewer than N elements.
Safety
Only the first init_count
elements will be init, the remaining elements must not be read.
Fields of NotEnoughElements
values: [MaybeUninit<T>; N]
The consumed values, only init_count
of which will be init.
init_count: usize
How many elements in values
are init.
Trait Implementations
impl<T, const N: usize> Debug for CollectArrayResult<T, N> where
T: Debug,
[src]
T: Debug,
impl<T, const N: usize> FromIterator<T> for CollectArrayResult<T, N>
[src]
fn from_iter<It: IntoIterator<Item = T>>(it: It) -> Self
[src]
impl<T, const N: usize> PartialEq<CollectArrayResult<T, N>> for CollectArrayResult<T, N> where
T: PartialEq,
[src]
T: PartialEq,
fn eq(&self, other: &CollectArrayResult<T, N>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
Auto Trait Implementations
impl<T, const N: usize> Send for CollectArrayResult<T, N> where
T: Send,
T: Send,
impl<T, const N: usize> Sync for CollectArrayResult<T, N> where
T: Sync,
T: Sync,
impl<T, const N: usize> Unpin for CollectArrayResult<T, N> where
T: Unpin,
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,