cl-aux 1.0.2

Provides elements that describe collections
Documentation

Auxiliary elements for collections

CI crates.io Documentation License Rustc

For traits, this crate provides a single method for each operation to achieve maximum flexibility and freedom instead of imposing abstract subsets.

Examples

use cl_aux::*;

struct SomeCustomVector(Vec<i32>, Vec<i32>);

impl Length for SomeCustomVector {
  #[inline]
  fn length(&self) -> usize {
    self.0.length() + self.1.length()
  }
}

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