const_tools/
lib.rs

1//! Const array operations: map, zip, unzip, scan, fold.
2//!
3//! This crate provides macros for performing various operations on arrays in const contexts.
4#![no_std]
5
6#[doc(hidden)]
7pub mod __call;
8
9#[doc(hidden)]
10pub mod __manually_drop_inner_ref;
11pub use __manually_drop_inner_ref::*;
12
13#[doc(hidden)]
14pub mod __maybe_uninit_array_assume_init;
15pub use __maybe_uninit_array_assume_init::*;
16
17#[doc(hidden)]
18pub mod __maybe_uninit_array_uninit;
19pub use __maybe_uninit_array_uninit::*;
20
21#[doc(hidden)]
22pub mod __same_len;
23pub use __same_len::*;
24
25#[doc(hidden)]
26pub mod __zip_left;
27
28#[doc(hidden)]
29pub mod destructure;
30pub use destructure::*;
31
32#[doc(hidden)]
33mod fold;
34
35#[doc(hidden)]
36mod map;
37
38#[doc(hidden)]
39mod scan;
40
41#[doc(hidden)]
42mod unzip;
43
44#[doc(hidden)]
45mod zip;
46
47// The array-related macros implemented by this library use the following (meta)variable naming scheme:
48//
49// $(i|o)(i|a)(|e|p)
50// - (i|o) -> input or output
51// - (i|a) -> item or array
52// - (|e|p) -> ident, expression, or pattern
53//
54// As an example, `$iae:expr` would be an expression for the input array, or multiple in case of a repetition.