(layers: [u8; N])
| 160 | |
| 161 | #[inline] |
| 162 | pub const fn with<const N: usize>(layers: [u8; N]) -> Self { |
| 163 | let mut bits = 0u32; |
| 164 | let mut i = 0usize; |
| 165 | while i < N { |
| 166 | bits |= Self::layer(layers[i]).bits(); |
| 167 | i += 1; |
| 168 | } |
| 169 | Self(bits) |
| 170 | } |
| 171 | |
| 172 | #[inline] |
| 173 | pub fn from_layers<I, L>(layers: I) -> Self |
no test coverage detected