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

Method try_from_layers

perro_source/core/perro_structs/src/structs/bit_mask.rs:182–193  ·  view source on GitHub ↗
(layers: I)

Source from the content-addressed store, hash-verified

180
181 #[inline]
182 pub fn try_from_layers<I, L>(layers: I) -> Option<Self>
183 where
184 I: IntoIterator<Item = L>,
185 L: IntoBitMaskLayer,
186 {
187 let mut bits = 0u32;
188 for layer in layers {
189 let layer = layer.into_bitmask_layer()?;
190 bits |= Self::layer(layer).bits();
191 }
192 Some(Self(bits))
193 }
194
195 #[inline]
196 pub const fn with_bits<const N: usize>(bits_in: [u8; N]) -> Self {

Callers

nothing calls this directly

Calls 1

bitsMethod · 0.45

Tested by

no test coverage detected