Trait bones_lib::ecs::UnwrapMany
source · pub trait UnwrapMany<const N: usize, T> {
// Required method
fn unwrap_many(self) -> [T; N];
}
Expand description
Helper trait for unwraping each item in an array.
§Example
let data = [Some(1), Some(2)];
let [data1, data2] = data.unwrap_many();
Required Methods§
sourcefn unwrap_many(self) -> [T; N]
fn unwrap_many(self) -> [T; N]
Unwrap all the items in an array.