pub fn new(size: usize) -> Self {
        if size == 0 {
            panic!("A bounded queue may not be constructed with a size of 0!");
        }

        Self {
            front: 0,
            back: 0,
            vals: vec![None; size].into_boxed_slice(),
        }
    }
/// Creates a new bounded queue with a fixed size.
///
/// # Example
/// Create a new queue.
/// ```
/// # extern crate bounded_queue;
/// # use bounded_queue::*;
/// # fn main() {
/// // Create a new queue
/// let mut queue = BoundedQueue::new(5);
///
/// // use it here
/// # assert!(queue.is_empty());
/// # queue.push(0);
/// # }
/// ```
///
/// # Panics
/// This function will panic if `size == 0`.
Creates a new bounded queue with a fixed size.
Creates a new bounded queue with a fixed size .
pub fn new(size: usize) -> Self {
        if size == 0 {
            panic!("A bounded queue may not be constructed with a size of 0!");
        }
        Self {
            front: 0,
            back: 0,
            vals: vec![None; size].into_boxed_slice(),
        }
    }
pub fn new ( size : usize ) -> Self { if size == 0 { panic ! ( " " ) ; } Self { front : 0 , back : 0 , vals : vec ! [ None size ] . into_boxed_slice ( ) , } }
Creates a new bounded queue with a fixed size.
Creates a new bounded queue with a fixed size .
size
usize
size
usize
example
Create a new queue.
Create a new queue .
extern crate bounded_queue;
None
use bounded_queue::*;
None
fn main() {
Create a new queue
let mut queue = BoundedQueue::new(5).

use it here
Create a new queue let mut queue = BoundedQueue :: new ( 5 ) . use it here
assert!(queue.is_empty());
None
queue.push(0);
None
}
None
panics
This function will panic if `size == 0`.
This function will panic if ` size == 0 ` .