VecDeque::capacity
pub fn capacity() -> int Import
Source: use collections::deque::{VecDeque}; src/collections/deque.hy Returns how many values fit before the ring buffer grows.
Called on a VecDeque value as value.capacity(…).
Returns#
int
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::push_back: Addsvat the back.VecDeque::push_front: Addsvat the front.VecDeque::peek_front: Returns the front value without removing it, orNonewhen the deque is empty.