Skip to main content

Crate vecxe

Crate vecxe 

Source
Expand description

§Vecxe - Utility functions for vec

A high-performance crate extending Rust’s Vec<T> with iterator-like operations, zero-cost abstractions, and specialized vector operations.

§Example

use vecxe::WindowedExt;

let v = vec![10, 20, 30, 40, 50, 60, 70];
let mut windows = v.sliding_windows_by(3, 2);

assert_eq!(windows.next(), Some([10, 20, 30].as_slice()));
assert_eq!(windows.next(), Some([30, 40, 50].as_slice()));
assert_eq!(windows.next(), Some([50, 60, 70].as_slice()));
assert_eq!(windows.next(), None);

Traits§

TransmuteExt
WindowedExt