VecDeque::peek_front
pub fn peek_front() -> Option<T> Import
Source: use collections::deque::{VecDeque}; src/collections/deque.hy Returns the front value without removing it, or None when the deque is empty.
Called on a VecDeque value as value.peek_front(…).
Returns#
Option<T>
See also#
VecDeque: A double-ended queue: constant-time push and pop at both ends.VecDeque::with_capacity: Empty deque with ring capacity rounded up to the next power of two (min 8).VecDeque::new: Empty deque with default capacity 8.VecDeque::size: Returns the number of values.VecDeque::is_empty: Returnstruewhen the deque has no values.VecDeque::capacity: Returns how many values fit before the ring buffer grows.VecDeque::push_back: Addsvat the back.VecDeque::push_front: Addsvat the front.