konst/
range.rs

1//! `const fn` equivalents of range methods.
2
3/// `const fn`s for comparing range for equality and ordering.
4#[cfg(feature = "cmp")]
5#[cfg_attr(feature = "docsrs", doc(cfg(feature = "cmp")))]
6pub mod cmp;
7
8/// Const-iterator for [`Range`](core::ops::Range)
9///
10/// This is constructed like this:
11/// ```rust
12/// # let _ =
13/// konst::iter::into_iter!(0..10)
14/// # ;
15/// ```
16pub use konst_macro_rules::into_iter::range_into_iter::RangeIter;
17
18/// Reversed const-iterator for [`Range`](core::ops::Range)
19///
20///
21/// This is constructed like this:
22/// ```rust
23/// # let _ =
24/// konst::iter::into_iter!(0..10).rev()
25/// # ;
26/// ```
27pub use konst_macro_rules::into_iter::range_into_iter::RangeIterRev;
28
29/// Const-iterator for [`RangeInclusive`](core::ops::RangeInclusive)
30///
31/// This is constructed like this:
32/// ```rust
33/// # let _ =
34/// konst::iter::into_iter!(0..=10)
35/// # ;
36/// ```
37pub use konst_macro_rules::into_iter::range_into_iter::RangeInclusiveIter;
38
39/// Reversed const-iterator for [`RangeInclusive`](core::ops::RangeInclusive)
40///
41/// This is constructed like this:
42/// ```rust
43/// # let _ =
44/// konst::iter::into_iter!(0..=10).rev()
45/// # ;
46/// ```
47pub use konst_macro_rules::into_iter::range_into_iter::RangeInclusiveIterRev;
48
49/// Const-iterator for [`RangeFrom`](core::ops::RangeFrom)
50///
51/// This is constructed like this:
52/// ```rust
53/// # let _ =
54/// konst::iter::into_iter!(0..)
55/// # ;
56/// ```
57pub use konst_macro_rules::into_iter::range_into_iter::RangeFromIter;