#[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
impl LinkedListNode
pub unsafe fn init_head(p_list_head: *mut LinkedListNode)
pub unsafe fn is_empty(p_list_head: *mut LinkedListNode) -> bool
Sourcepub unsafe fn insert_head(
p_list_head: *mut LinkedListNode,
p_node: *mut LinkedListNode,
)
pub unsafe fn insert_head( p_list_head: *mut LinkedListNode, p_node: *mut LinkedListNode, )
Insert node
after list_head
and before the next node
Sourcepub unsafe fn insert_tail(
p_list_tail: *mut LinkedListNode,
p_node: *mut LinkedListNode,
)
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
Sourcepub unsafe fn remove_node(p_node: *mut LinkedListNode)
pub unsafe fn remove_node(p_node: *mut LinkedListNode)
Remove node
from the linked list
Sourcepub unsafe fn remove_head(
p_list_head: *mut LinkedListNode,
) -> Option<*mut LinkedListNode>
pub unsafe fn remove_head( p_list_head: *mut LinkedListNode, ) -> Option<*mut LinkedListNode>
Remove list_head
and return a pointer to the node
.
Sourcepub unsafe fn remove_tail(
p_list_tail: *mut LinkedListNode,
) -> Option<*mut LinkedListNode>
pub unsafe fn remove_tail( p_list_tail: *mut LinkedListNode, ) -> Option<*mut LinkedListNode>
Remove list_tail
and return a pointer to the node
.
pub unsafe fn insert_node_after( node: *mut LinkedListNode, ref_node: *mut LinkedListNode, )
pub unsafe fn insert_node_before( node: *mut LinkedListNode, ref_node: *mut LinkedListNode, )
pub unsafe fn get_size(list_head: *mut LinkedListNode) -> usize
pub unsafe fn get_next_node( p_ref_node: *mut LinkedListNode, ) -> *mut LinkedListNode
pub unsafe fn get_prev_node( p_ref_node: *mut LinkedListNode, ) -> *mut LinkedListNode
Trait Implementations§
Source§impl Clone for LinkedListNode
impl Clone for LinkedListNode
Source§fn clone(&self) -> LinkedListNode
fn clone(&self) -> LinkedListNode
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for LinkedListNode
impl Default for LinkedListNode
impl Copy for LinkedListNode
Auto Trait Implementations§
impl Freeze for LinkedListNode
impl RefUnwindSafe for LinkedListNode
impl !Send for LinkedListNode
impl !Sync for LinkedListNode
impl Unpin for LinkedListNode
impl UnwindSafe for LinkedListNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more