[−][src]Struct rjwindow::Window
Implementations
impl<T> Window<T>
[src]
pub fn new(max_size: usize) -> Window<T>
[src]
pub fn clear(&mut self)
[src]
pub fn len(&self) -> usize
[src]
pub fn extend(&mut self, data: Vec<T>)
[src]
stacks the vector into the window taking ownership of items in vector.
pub fn stack(&mut self, data: T)
[src]
stacks an item into the window remove the earliest item if the max size has been reached
pub fn get_mut(&mut self) -> &mut VecDeque<T>
[src]
Returns a mutable reference to the internal deque.
pub fn get(&self) -> &VecDeque<T>
[src]
Returns a reference to the internal deque.
pub fn peek(&self, amount: usize) -> VecDeque<&T>
[src]
Retrieves references to the latest values up to the specified amount. The returned values could be less then this amount if there is not enough in the window.
pub fn pop(&mut self, amount: usize) -> VecDeque<T>
[src]
Pops the latests values up to the specified amount taking ownership. The returned values could be less then this amount if there is not enough in the window.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Window<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Window<T> where
T: Send,
T: Send,
impl<T> Sync for Window<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Window<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Window<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,