Skip to main content

UnusedLinks

Struct UnusedLinks 

Source
pub struct UnusedLinks<T: LinkReference> { /* private fields */ }

Implementations§

Source§

impl<T: LinkReference> UnusedLinks<T>

Source

pub fn new( links: NonNull<[DataPart<T>]>, header: NonNull<[IndexPart<T>]>, ) -> Self

Trait Implementations§

Source§

impl<T: LinkReference> AbsoluteCircularLinkedList<T> for UnusedLinks<T>

Source§

fn attach_before(&mut self, base_element: T, new_element: T)

Inserts new_element immediately before base_element. Read more
Source§

fn attach_after(&mut self, base_element: T, new_element: T)

Inserts new_element immediately after base_element. Read more
Source§

fn attach_as_first(&mut self, element: T)

Inserts element as the first element of the list. Read more
Source§

fn attach_as_last(&mut self, element: T)

Inserts element as the last element of the list. Read more
Source§

fn detach(&mut self, element: T)

Removes element from the list. Read more
Source§

impl<T: LinkReference> AbsoluteLinkedList<T> for UnusedLinks<T>

Source§

fn get_first(&self) -> T

Returns the first element (head) of the list, or T::from_byte(0) if empty.
Source§

fn get_last(&self) -> T

Returns the last element (tail) of the list, or T::from_byte(0) if empty.
Source§

fn get_size(&self) -> T

Returns the number of elements in the list.
Source§

fn set_first(&mut self, element: T)

Sets the first element (head) of the list.
Source§

fn set_last(&mut self, element: T)

Sets the last element (tail) of the list.
Source§

fn set_size(&mut self, size: T)

Sets the size of the list.
Source§

fn inc_size(&mut self)

Increments the list size by one.
Source§

fn dec_size(&mut self)

Decrements the list size by one.
Source§

impl<T: LinkReference> LinkedList<T> for UnusedLinks<T>

Source§

fn get_previous(&self, element: T) -> T

Returns the previous element of element.
Source§

fn get_next(&self, element: T) -> T

Returns the next element of element.
Source§

fn set_previous(&mut self, element: T, previous: T)

Sets the previous pointer of element to previous.
Source§

fn set_next(&mut self, element: T, next: T)

Sets the next pointer of element to next.
Source§

impl<T: LinkReference> LinksList<T> for UnusedLinks<T>

Source§

fn detach(&mut self, link: T)

Source§

fn attach_as_first(&mut self, link: T)

Source§

impl<T: LinkReference> SplitList<T> for UnusedLinks<T>

Source§

impl<T: LinkReference> SplitUpdateMem<T> for UnusedLinks<T>

Source§

fn update_mem( &mut self, data: NonNull<[DataPart<T>]>, index: NonNull<[IndexPart<T>]>, )

Auto Trait Implementations§

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.