Struct LinkedListBuddy

Source
pub struct LinkedListBuddy { /* private fields */ }
Expand description

侵入式链表伙伴行。

Trait Implementations§

Source§

impl BuddyCollection for LinkedListBuddy

Source§

fn take_any(&mut self, align_order: usize) -> Option<usize>

提取任何一个满足 align_order 的内存块。 Read more
Source§

fn put(&mut self, idx: usize) -> Option<usize>

放入一个元素 idxRead more
Source§

impl BuddyLine for LinkedListBuddy

Source§

const INTRUSIVE_META_SIZE: usize = 8usize

侵入式元数据的大小。
Source§

const EMPTY: Self

空集合。用于静态初始化。
Source§

fn init(&mut self, order: usize, _base: usize)

伙伴分配器可能需要集合知道自己的阶数和基序号。
Source§

fn take(&mut self, _idx: usize) -> bool

提取指定位置的元素,返回是否提取到。
Source§

impl Debug for LinkedListBuddy

Source§

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

Formats the value using the given formatter. Read more
Source§

impl OligarchyCollection for LinkedListBuddy

Source§

fn take_any(&mut self, align_order: usize, count: usize) -> Option<usize>

提取任何 count 个满足 align_order 的内存块。 Read more
Source§

fn put(&mut self, idx: usize)

放入一个元素 idx
Source§

impl Send for LinkedListBuddy

必须实现 Send 才能加锁。

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 = 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.