devela/data/collections/array/d1/uninit/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// devela::data::collections:array::d1::uninit
//
//!
//

use crate::{Bare, MaybeUninit, Storage};

mod methods;

/// A static array allowing uninitialized elements.
#[derive(Default)]
pub struct ArrayUninit<T, const CAP: usize, S: Storage = Bare> {
    data: S::Stored<[MaybeUninit<T>; CAP]>,

    // The number of already initialized elements, and
    // the index of the first uninitialized element (if CAP > 0).
    init_len: usize,
}