MCPcopy Create free account
hub / github.com/PerroEngine/Perro / with_bits

Method with_bits

perro_source/core/perro_structs/src/structs/bit_mask.rs:196–204  ·  view source on GitHub ↗
(bits_in: [u8; N])

Source from the content-addressed store, hash-verified

194
195 #[inline]
196 pub const fn with_bits<const N: usize>(bits_in: [u8; N]) -> Self {
197 let mut bits = 0u32;
198 let mut i = 0usize;
199 while i < N {
200 bits |= Self::bit(bits_in[i]).bits();
201 i += 1;
202 }
203 Self(bits)
204 }
205
206 #[inline]
207 pub const fn without_layers<const N: usize>(self, layers: [u8; N]) -> Self {

Callers

nothing calls this directly

Calls 1

bitsMethod · 0.45

Tested by

no test coverage detected