functional_vec 0.2.0

Owning versions of mutable Vec methods.
Documentation
  • Coverage
  • 0%
    0 out of 56 items documented0 out of 0 items with examples
  • Size
  • Source code size: 29.14 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.65 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
  • SKyletoft/functional_vec
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SKyletoft

Functional Vec

Owning versions of all mutable vec methods. Makes vecs slightly more ergonomic to use in folds.

Supports no_std environments using the alloc crate directly.

Example

use functional_vec::FunctionalVec;

let v = (0..10).fold(
	Vec::new(),
	|acc, curr| acc.push_new(curr)
);
assert_eq!(v, vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);

Other types

This crate supports std::vec::Vec and std::collections::VecDeque by default. smallvec::SmallVec from the crate smallvec (Version 1.10) is also supported if you enable the smallvec feature.