Trait DequeImmut

Source
pub trait DequeImmut<T>: Sized {
    // Required methods
    fn push_front(&self, _: T) -> Self;
    fn push_back(&self, _: T) -> Self;
    fn pop_front(&self) -> Self;
    fn pop_back(&self) -> Self;
    fn front(&self) -> Option<&T>;
    fn back(&self) -> Option<&T>;

    // Provided methods
    fn pop_and_front(&self) -> (Self, Option<&T>) { ... }
    fn pop_and_back(&self) -> (Self, Option<&T>) { ... }
}

Required Methods§

Source

fn push_front(&self, _: T) -> Self

Source

fn push_back(&self, _: T) -> Self

Source

fn pop_front(&self) -> Self

Source

fn pop_back(&self) -> Self

Source

fn front(&self) -> Option<&T>

Source

fn back(&self) -> Option<&T>

Provided Methods§

Source

fn pop_and_front(&self) -> (Self, Option<&T>)

Source

fn pop_and_back(&self) -> (Self, Option<&T>)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§