pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut T> {
        let allowance = &mut self.allowance;

        self.queue
            .iter_mut()
            .take(*allowance)
            .inspect(move |_| *allowance -= 1)
    }
/// Returns a front-to-back iterator that returns mutable references.
///
/// # Examples
///
/// ```
/// # use std::time::Duration;
/// use rate_limit_queue::{RateLimitQueue, DequeueResult};
///
/// let mut queue = RateLimitQueue::new(2, Duration::from_secs(10));
/// queue.enqueue(1);
/// queue.enqueue(2);
///
/// let b: &[_] = &[&mut 1, &mut 2];
/// let c: Vec<&mut i32> = queue.iter_mut().collect();
/// assert_eq!(&c[..], b);
/// ```
Returns a front-to-back iterator that returns mutable references.
Returns a front - to - back iterator that returns mutable references .
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut T> {
        let allowance = &mut self.allowance;
        self.queue
            .iter_mut()
            .take(*allowance)
            .inspect(move |_| *allowance -= 1)
    }
pub fn iter_mut ( & mut self ) -> impl Iterator < Item = & mut T > { let allowance = & mut self . allowance ; self . queue . iter_mut ( ) . take ( * allowance ) . inspect ( move | _ | * allowance -= 1 ) }
Returns a front-to-back iterator that returns mutable references.
Returns a front - to - back iterator that returns mutable references .
&mut self
&mut self
examples
None
use std::time::duration;
use rate_limit_queue::{RateLimitQueue, DequeueResult}.

let mut queue = RateLimitQueue::new(2, Duration::from_secs(10));
queue.enqueue(1);
queue.enqueue(2).


use rate_limit_queue :: { RateLimitQueue DequeueResult } . let mut queue = RateLimitQueue :: new ( 2 Duration :: from_secs ( 10 )) ; queue . enqueue ( 1 ) ; queue . enqueue ( 2 ) .