Struct rust_algorithm_club::collections::Queue
source · [−]pub struct Queue<T> { /* private fields */ }
Expand description
A queue-like data structure implement through std::vec::Vec
.
This is a naive implementation whose insertion time complexity is O(n)
,
which can be improved trivially by using a Deque
or
SinglyLinkedList
.
References:
Implementations
sourceimpl<T> Queue<T>
impl<T> Queue<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Queue<T> where
T: RefUnwindSafe,
impl<T> Send for Queue<T> where
T: Send,
impl<T> Sync for Queue<T> where
T: Sync,
impl<T> Unpin for Queue<T> where
T: Unpin,
impl<T> UnwindSafe for Queue<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more