Struct mariadb_sys::I_P_List

source ·
#[repr(C)]
pub struct I_P_List<T, C, I> { pub _base: C, pub _base_1: I, pub m_first: *mut T, pub _phantom_0: PhantomData<UnsafeCell<T>>, pub _phantom_1: PhantomData<UnsafeCell<C>>, pub _phantom_2: PhantomData<UnsafeCell<I>>, }
Expand description

Intrusive parameterized list.

Unlike I_List does not require its elements to be descendant of ilink class and therefore allows them to participate in several such lists simultaneously.

Unlike List is doubly-linked list and thus supports efficient deletion of element without iterator.

  • T () Type of elements which will belong to list.

  • B () Class which via its methods specifies which members of T should be used for participating in this list. Here is typical layout of such class:

struct B { static inline T **next_ptr(T *el) { return &el->next; } static inline T ***prev_ptr(T *el) { return &el->prev; } };

  • C () Policy class specifying how counting of elements in the list should be done. Instance of this class is also used as a place where information about number of list elements is stored. @sa I_P_List_null_counter, I_P_List_counter

  • I () Policy class specifying whether I_P_List should support efficient push_back() operation. Instance of this class is used as place where we store information to support this operation. @sa I_P_List_no_push_back, I_P_List_fast_push_back.

Fields§

§_base: C§_base_1: I§m_first: *mut T§_phantom_0: PhantomData<UnsafeCell<T>>§_phantom_1: PhantomData<UnsafeCell<C>>§_phantom_2: PhantomData<UnsafeCell<I>>

Trait Implementations§

source§

impl<T: Debug, C: Debug, I: Debug> Debug for I_P_List<T, C, I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T, C, I> !RefUnwindSafe for I_P_List<T, C, I>

§

impl<T, C, I> !Send for I_P_List<T, C, I>

§

impl<T, C, I> !Sync for I_P_List<T, C, I>

§

impl<T, C, I> Unpin for I_P_List<T, C, I>
where C: Unpin, I: Unpin, T: Unpin,

§

impl<T, C, I> UnwindSafe for I_P_List<T, C, I>

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>,

§

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>,

§

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.