pub struct Window<T> { /* private fields */ }
Implementations§
Source§impl<T> Window<T>
impl<T> Window<T>
pub fn new(max_size: usize) -> Window<T>
pub fn clear(&mut self)
pub fn len(&self) -> usize
Sourcepub fn extend(&mut self, data: Vec<T>)
pub fn extend(&mut self, data: Vec<T>)
stacks the vector into the window taking ownership of items in vector.
Sourcepub fn stack(&mut self, data: T)
pub fn stack(&mut self, data: T)
stacks an item into the window remove the earliest item if the max size has been reached
Sourcepub fn get_mut(&mut self) -> &mut VecDeque<T>
pub fn get_mut(&mut self) -> &mut VecDeque<T>
Returns a mutable reference to the internal deque.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Window<T>
impl<T> RefUnwindSafe for Window<T>where
T: RefUnwindSafe,
impl<T> Send for Window<T>where
T: Send,
impl<T> Sync for Window<T>where
T: Sync,
impl<T> Unpin for Window<T>where
T: Unpin,
impl<T> UnwindSafe for Window<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more