Skip to main content

AvlBuddy

Struct AvlBuddy 

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

基于平衡二叉查找树的侵入式伙伴行。

Trait Implementations§

Source§

impl BuddyCollection for AvlBuddy

Source§

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

insert node into avl_buddy

Source§

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

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

impl BuddyLine for AvlBuddy

Source§

const INTRUSIVE_META_SIZE: usize

侵入式元数据的大小。
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 AvlBuddy

Source§

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

以序列化前序遍历的方式输出

Source§

impl OligarchyCollection for AvlBuddy

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 AvlBuddy

必须实现 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.