arith 0.2.3

containers with arithmetics
Documentation
  • Coverage
  • 60%
    3 out of 5 items documented2 out of 3 items with examples
  • Size
  • Source code size: 8.77 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.74 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Documentation
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • oleskiewicz

arith

Containers with arithmetic operations support.

Usage

arithmap!{"a" => 1, "b" => 2} + 1 == arithmap!{"a" => 2, "b" => 3};
arithmap!{"a" => 1, "b" => 2} + arithmap!{"b" => 2, "c" => 3} == arithmap!{"a" => 1, "b" => 4, "c" => 3};
(arithmap!{"a" => 0, "b" => 1}.prune()) == arithmap!{"b" => 1};

You can access underlying values with .hashmap field. For now only &'a str keys are supported, until I convince the borrow checker to let me use a generic key type.

Documentation

Copyright

Copyright (C) 2021- Piotr Oleśkiewicz

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.