| Crates.io | cl-aux |
| lib.rs | cl-aux |
| version | 5.1.0 |
| created_at | 2022-05-26 19:58:44.420927+00 |
| updated_at | 2025-08-23 02:23:42.143595+00 |
| description | Provides elements that describe collections |
| homepage | |
| repository | https://github.com/c410-f3r/regular-crates |
| max_upload_size | |
| id | 594380 |
| size | 112,421 |
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;
}