Skip to main content

InternalSourcesLinkedList

Struct InternalSourcesLinkedList 

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

Implementations§

Source§

impl<T: LinkReference> InternalSourcesLinkedList<T>

Source

pub fn new( constants: LinksConstants<T>, data: NonNull<[DataPart<T>]>, indexes: NonNull<[IndexPart<T>]>, ) -> Self

Source

pub fn count_usages(&self, head: T) -> T

Source

pub fn each_usages<H: FnMut(Link<T>) -> Flow + ?Sized>( &self, source: T, handler: &mut H, ) -> Flow

Trait Implementations§

Source§

impl<T: LinkReference> LinkedList<T> for InternalSourcesLinkedList<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> RelativeCircularLinkedList<T> for InternalSourcesLinkedList<T>

Source§

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

Inserts new_element immediately before base_element in the list identified by head.
Source§

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

Inserts new_element immediately after base_element in the list identified by head.
Source§

fn attach_as_first(&mut self, head: T, element: T)

Inserts element as the first element of the list identified by head.
Source§

fn attach_as_last(&mut self, head: T, element: T)

Inserts element as the last element of the list identified by head.
Source§

fn detach(&mut self, head: T, element: T)

Removes element from the list identified by head.
Source§

impl<T: LinkReference> RelativeLinkedList<T> for InternalSourcesLinkedList<T>

Source§

fn get_first(&self, head: T) -> T

Returns the first element of the list identified by head.
Source§

fn get_last(&self, head: T) -> T

Returns the last element of the list identified by head.
Source§

fn get_size(&self, head: T) -> T

Returns the size of the list identified by head.
Source§

fn set_first(&mut self, head: T, element: T)

Sets the first element of the list identified by head.
Source§

fn set_last(&mut self, _head: T, _element: T)

Sets the last element of the list identified by head.
Source§

fn set_size(&mut self, head: T, size: T)

Sets the size of the list identified by head.
Source§

fn inc_size(&mut self, head: T)

Increments the size of the list identified by head by one.
Source§

fn dec_size(&mut self, head: T)

Decrements the size of the list identified by head by one.
Source§

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

Source§

fn update_mem( &mut self, data: NonNull<[DataPart<T>]>, indexes: 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, <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.