Struct sliding_windows::SlidingWindowStorage
[−]
[src]
pub struct SlidingWindowStorage<T> {
// some fields omitted
}This holds the backing allocation for the Window of a SlidingWindowAdaptor.
See sliding_windows for more information.
Methods
impl<T> SlidingWindowStorage<T>
fn new(window_size: usize) -> SlidingWindowStorage<T>
Create a new SlidingWindowStorage with a given window size.
This will allocate as much memory as is needed to store the Window automatically.
See sliding_windows for more information.
fn from_vec(vec: Vec<T>, window_size: usize) -> SlidingWindowStorage<T>
Create a new SlidingWindowStorage with a given window size from a given Vec.
The contents of the Vec will be removed.
This will reuse the allocation of the Vec instead of allocating new memory.
See sliding_windows for more information.