embassy-stm32-wpan

Crates

git

Versions

default

Flavors

embassy_stm32_wpan::unsafe_linked_list

Struct LinkedListNode

Source
#[repr(C, packed(4))]
pub struct LinkedListNode { pub next: *mut LinkedListNode, pub prev: *mut LinkedListNode, }

Fields§

§next: *mut LinkedListNode§prev: *mut LinkedListNode

Implementations§

Source§

impl LinkedListNode

Source

pub unsafe fn init_head(p_list_head: *mut LinkedListNode)

Source

pub unsafe fn is_empty(p_list_head: *mut LinkedListNode) -> bool

Source

pub unsafe fn insert_head( p_list_head: *mut LinkedListNode, p_node: *mut LinkedListNode, )

Insert node after list_head and before the next node

Source

pub unsafe fn insert_tail( p_list_tail: *mut LinkedListNode, p_node: *mut LinkedListNode, )

Insert node before list_tail and after the second-to-last node

Source

pub unsafe fn remove_node(p_node: *mut LinkedListNode)

Remove node from the linked list

Source

pub unsafe fn remove_head( p_list_head: *mut LinkedListNode, ) -> Option<*mut LinkedListNode>

Remove list_head and return a pointer to the node.

Source

pub unsafe fn remove_tail( p_list_tail: *mut LinkedListNode, ) -> Option<*mut LinkedListNode>

Remove list_tail and return a pointer to the node.

Source

pub unsafe fn insert_node_after( node: *mut LinkedListNode, ref_node: *mut LinkedListNode, )

Source

pub unsafe fn insert_node_before( node: *mut LinkedListNode, ref_node: *mut LinkedListNode, )

Source

pub unsafe fn get_size(list_head: *mut LinkedListNode) -> usize

Source

pub unsafe fn get_next_node( p_ref_node: *mut LinkedListNode, ) -> *mut LinkedListNode

Source

pub unsafe fn get_prev_node( p_ref_node: *mut LinkedListNode, ) -> *mut LinkedListNode

Trait Implementations§

Source§

impl Clone for LinkedListNode

Source§

fn clone(&self) -> LinkedListNode

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Default for LinkedListNode

Source§

fn default() -> Self

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

impl Copy for LinkedListNode

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> CloneToUninit for T
where T: Clone,

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> Same for T

Source§

type Output = T

Should always be Self
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.