Struct DoubleLinkedList

Source
pub struct DoubleLinkedList<'a, T> {
    pub root_idx: usize,
    /* private fields */
}

Fields§

§root_idx: usize

Implementations§

Source§

impl<'a, T> DoubleLinkedList<'a, T>

Source

pub fn new(arena_list: &'a mut ArenaList<T>) -> Self

Source

pub fn from_vec( arena_list: &'a mut ArenaList<T>, vec1: Vec<T>, ) -> DoubleLinkedList<'_, T>

Source

pub fn to_vec(&self) -> Vec<&T>

Source

pub fn add_node(&mut self, data: Option<T>) -> usize

Source

pub fn get_node_by_idx(&self, idx: usize) -> &Node<T>

Source

pub fn insert(&mut self, num: usize, data: T)

Source

pub fn get(&self, num: usize) -> Option<&T>

Source

pub fn del(&mut self, num: usize)

Auto Trait Implementations§

§

impl<'a, T> Freeze for DoubleLinkedList<'a, T>

§

impl<'a, T> RefUnwindSafe for DoubleLinkedList<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> Send for DoubleLinkedList<'a, T>
where T: Send,

§

impl<'a, T> Sync for DoubleLinkedList<'a, T>
where T: Sync,

§

impl<'a, T> Unpin for DoubleLinkedList<'a, T>

§

impl<'a, T> !UnwindSafe for DoubleLinkedList<'a, 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> 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, 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.