13 stable releases (4 major)

5.0.1 Aug 1, 2024
5.0.0 Jul 10, 2024
4.4.0 Oct 23, 2023
3.0.0 Oct 19, 2023
1.1.0 Jul 31, 2022

#131 in Development tools

Download history 118/week @ 2024-12-15 67/week @ 2024-12-22 83/week @ 2024-12-29 128/week @ 2025-01-05 112/week @ 2025-01-12 166/week @ 2025-01-19 78/week @ 2025-01-26 86/week @ 2025-02-02 69/week @ 2025-02-09 249/week @ 2025-02-16 209/week @ 2025-02-23 111/week @ 2025-03-02 85/week @ 2025-03-09 185/week @ 2025-03-16 190/week @ 2025-03-23 145/week @ 2025-03-30

612 downloads per month
Used in 5 crates (4 directly)

Apache-2.0

99KB
3K SLoC

Auxiliary elements for collections

CI crates.io Documentation License Rustc

Provides well-defined traits with single methods that enable the achievement of maximum flexibility and freedom in several different operations instead of imposing abstract subsets.

use cl_aux::Length;

struct SomeCustomArray([i32; 2], [i32; 4]);

impl Length for SomeCustomArray {
  fn length(&self) -> usize {
    self.0.length() + self.1.length()
  }
}

fn main() {
  let v = SomeCustomArray([1, 2], [3, 4, 5, 6]);
  assert_eq!(v.length(), 6);
}

Also provides structures for common use-cases.

use cl_aux::ArrayWrapper;

fn main() {
  let _array: [usize; 1] = ArrayWrapper::from_fn(|idx| idx).0;
}

Dependencies

~0–265KB