Struct sliding_windows::Storage
[−]
[src]
pub struct Storage<T> { /* fields omitted */ }
This holds the backing allocation for the Window
of an Adaptor
.
See sliding_windows for more information.
Methods
impl<T> Storage<T>
[src]
fn new(window_size: usize) -> Storage<T>
Create a new Storage
with a given window size.
This will allocate window_size * sizeof::<T>
bytes on the heap.
See sliding_windows for more information.
fn from_vec<S: Into<Vec<T>>>(vec: S, window_size: usize) -> Storage<T>
Create a new Storage
with a given window size from a given type implementing Into<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.