pub fn dequeue(&mut self) -> Option<T> {
        let rb = unsafe { self.rb.as_ref() };

        let n = rb.capacity() + 1;
        let buffer: &[T] = unsafe { rb.buffer.as_ref() };

        let tail = rb.tail.load_acquire();
        let head = rb.head.load_relaxed();
        if head != tail {
            let item = unsafe { ptr::read(buffer.get_unchecked(head)) };
            rb.head.store_release((head + 1) % n);
            Some(item)
        } else {
            None
        }
    }
/// Returns the item in the front of the queue, or `None` if the queue is empty
Returns the item in the front of the queue, or `None` if the queue is empty
Returns the item in the front of the queue or ` None ` if the queue is empty
pub fn dequeue(&mut self) -> Option<T> {
        let rb = unsafe { self.rb.as_ref() };
        let n = rb.capacity() + 1;
        let buffer: &[T] = unsafe { rb.buffer.as_ref() };
        let tail = rb.tail.load_acquire();
        let head = rb.head.load_relaxed();
        if head != tail {
            let item = unsafe { ptr::read(buffer.get_unchecked(head)) };
            rb.head.store_release((head + 1) % n);
            Some(item)
        } else {
            None
        }
    }
pub fn dequeue ( & mut self ) -> Option < T > { let rb = unsafe { self . rb . as_ref ( ) } ; let n = rb . capacity ( ) + 1 ; let buffer : & [ T ] = unsafe { rb . buffer . as_ref ( ) } ; let tail = rb . tail . load_acquire ( ) ; let head = rb . head . load_relaxed ( ) ; if head != tail { let item = unsafe { ptr :: read ( buffer . get_unchecked ( head ) ) } ; rb . head . store_release ( ( head + 1 ) % n ) ; Some ( item ) } else { None } }
Returns the item in the front of the queue, or `None` if the queue is empty
Returns the item in the front of the queue or ` None ` if the queue is empty
&mut self
&mut self