Skip to main content

VecDeque

Struct VecDeque 

Source
pub struct VecDeque<T> { /* private fields */ }

Implementations§

Source§

impl<T> VecDeque<T>

Source

pub fn capacity(&self) -> usize

Source§

impl<T> VecDeque<T>

Source

pub fn empty(&self) -> bool

Source§

impl<T> VecDeque<T>

Source

pub fn get_allocator(&self)

Source§

impl<T> VecDeque<T>

Source

pub fn is_contiguous(&self) -> bool

Source§

impl<T> VecDeque<T>

Source

pub fn is_full(&self) -> bool

Source§

impl<T> VecDeque<T>

Source

pub fn max_size(&self) -> usize

Source§

impl<T> VecDeque<T>

Source

pub fn operator_assign(&mut self, other: &VecDeque<T>) -> &mut Self

Source§

impl<T> VecDeque<T>

Source

pub fn operator_assign_mut(&mut self, other: VecDeque<T>) -> &mut Self

Source§

impl<T> VecDeque<T>

Source

pub fn operator_index_mut(&mut self, pos: usize) -> &mut T

Source§

impl<T> VecDeque<T>

Source

pub fn operator_index(&self, pos: usize) -> &T

Source§

impl<T> VecDeque<T>

Source

pub fn size(&self) -> usize

Source§

impl<T> VecDeque<T>

Source

pub fn new() -> Self

Source§

impl<T> VecDeque<T>

Source

pub fn with_allocator(_alloc: ()) -> Self

Source§

impl<T> VecDeque<T>

Source

pub fn vec_deque_vec_deque(&mut self)

C++ destructor logic for VecDeque. In Rust, this is implemented via the Drop trait on the record itself. This method is a stub for the C++ destructor entry point.

Source§

impl<T> VecDeque<T>

Source

pub fn from_init_list(items: Vec<T>) -> Self

VecDeque(std::initializer_list<T>) — construct from a list, reserving exactly the element count so the buffer is contiguous with capacity == size (no growth), matching the C++ initializer-list ctor.

Source

pub fn push_back(&mut self, value: T)

Source

pub fn pop_back(&mut self)

Source

pub fn push_front(&mut self, value: T)

Source

pub fn pop_front(&mut self)

Source

pub fn clear(&mut self)

Source

pub fn reserve(&mut self, new_capacity: usize)

Source

pub fn shrink_to_fit(&mut self)

Source

pub fn at(&self, pos: usize) -> &T

Source

pub fn at_mut(&mut self, pos: usize) -> &mut T

Source

pub fn front(&self) -> &T

Source

pub fn front_mut(&mut self) -> &mut T

Source

pub fn back(&self) -> &T

Source

pub fn back_mut(&mut self) -> &mut T

Trait Implementations§

Source§

impl<T: Clone> Clone for VecDeque<T>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for VecDeque<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Default for VecDeque<T>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T> Drop for VecDeque<T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl<T: Clone> From<&[T]> for VecDeque<T>

Source§

fn from(init: &[T]) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<T> !Send for VecDeque<T>

§

impl<T> !Sync for VecDeque<T>

§

impl<T> Freeze for VecDeque<T>

§

impl<T> RefUnwindSafe for VecDeque<T>
where T: RefUnwindSafe,

§

impl<T> Unpin for VecDeque<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for VecDeque<T>

§

impl<T> UnwindSafe for VecDeque<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.