Trait pipewire_wrapper::spa::list::List   
source · pub trait Listwhere
    Self: Sized,{
    type Elem: ListElement;
Show 16 methods
    // Required methods
    fn as_list_ptr(&self) -> *mut spa_list;
    fn from_list_ptr(ptr: *mut spa_list) -> *mut Self;
    // Provided methods
    fn init(&mut self) { ... }
    fn initialized(&self) -> bool { ... }
    fn empty(&self) -> bool { ... }
    unsafe fn insert(&mut self, elem: &mut Self::Elem) { ... }
    unsafe fn insert_list(&mut self, other: &mut Self) { ... }
    unsafe fn next(&self, current: &Self::Elem) -> Option<&mut Self::Elem> { ... }
    unsafe fn prev(&self, current: &Self::Elem) -> Option<&mut Self::Elem> { ... }
    unsafe fn first(&self) -> Option<&mut Self::Elem> { ... }
    unsafe fn last(&self) -> Option<&mut Self::Elem> { ... }
    unsafe fn append(&mut self, elem: &mut Self::Elem) { ... }
    unsafe fn prepend(&mut self, elem: &mut Self::Elem) { ... }
    unsafe fn clean(&mut self) { ... }
    unsafe fn iter(&self) -> ListIterator<'_, Self> ⓘ { ... }
    unsafe fn iter_mut(&self) -> ListMutIterator<'_, Self> ⓘ { ... }
}Expand description
Linked list with ListElement In general, this struct should not be used outside the library.
Required Associated Types§
type Elem: ListElement
Required Methods§
sourcefn as_list_ptr(&self) -> *mut spa_list
 
fn as_list_ptr(&self) -> *mut spa_list
Raw pointer to the list itself
sourcefn from_list_ptr(ptr: *mut spa_list) -> *mut Self
 
fn from_list_ptr(ptr: *mut spa_list) -> *mut Self
Cast the list pointer to Self
Provided Methods§
sourcefn initialized(&self) -> bool
 
fn initialized(&self) -> bool
Check if this list was initialized
fn empty(&self) -> bool
sourceunsafe fn insert(&mut self, elem: &mut Self::Elem)
 
unsafe fn insert(&mut self, elem: &mut Self::Elem)
Insert ListElement to the list
Safety
Self::as_list_ptr must provide valid non-null pointer, that will not be changed in future.
sourceunsafe fn insert_list(&mut self, other: &mut Self)
 
unsafe fn insert_list(&mut self, other: &mut Self)
Join two lists
Safety
Self::as_list_ptr must provide valid non-null pointer, that will not be changed in future.
sourceunsafe fn next(&self, current: &Self::Elem) -> Option<&mut Self::Elem>
 
unsafe fn next(&self, current: &Self::Elem) -> Option<&mut Self::Elem>
Get the next element from the list
Safety
Self::as_list_ptr must provide valid non-null pointer, that will not be changed in future.
sourceunsafe fn prev(&self, current: &Self::Elem) -> Option<&mut Self::Elem>
 
unsafe fn prev(&self, current: &Self::Elem) -> Option<&mut Self::Elem>
Get the previous element from the list
Safety
Self::as_list_ptr must provide valid non-null pointer, that will not be changed in future.
sourceunsafe fn first(&self) -> Option<&mut Self::Elem>
 
unsafe fn first(&self) -> Option<&mut Self::Elem>
Get the first element from the list
Safety
Self::as_list_ptr must provide valid non-null pointer, that will not be changed in future.
sourceunsafe fn last(&self) -> Option<&mut Self::Elem>
 
unsafe fn last(&self) -> Option<&mut Self::Elem>
Get the last element from the list
Safety
Self::as_list_ptr must provide valid non-null pointer, that will not be changed in future.
sourceunsafe fn append(&mut self, elem: &mut Self::Elem)
 
unsafe fn append(&mut self, elem: &mut Self::Elem)
Append element to the list
Safety
Self::as_list_ptr must provide valid non-null pointer, that will not be changed in future.
sourceunsafe fn prepend(&mut self, elem: &mut Self::Elem)
 
unsafe fn prepend(&mut self, elem: &mut Self::Elem)
Prepend element to the list
Safety
Self::as_list_ptr must provide valid non-null pointer, that will not be changed in future.
sourceunsafe fn clean(&mut self)
 
unsafe fn clean(&mut self)
Clean the list
Safety
Self::as_list_ptr must provide valid non-null pointer, that will not be changed in future.
sourceunsafe fn iter(&self) -> ListIterator<'_, Self> ⓘ
 
unsafe fn iter(&self) -> ListIterator<'_, Self> ⓘ
Get the list iterator
Safety
Self::as_list_ptr must provide valid non-null pointer, that will not be changed in future.
sourceunsafe fn iter_mut(&self) -> ListMutIterator<'_, Self> ⓘ
 
unsafe fn iter_mut(&self) -> ListMutIterator<'_, Self> ⓘ
Get the list mut iterator
Safety
Self::as_list_ptr must provide valid non-null pointer, that will not be changed in future.