Trait BuddyLine

Source
pub trait BuddyLine {
    const EMPTY: Self;
    const INTRUSIVE_META_SIZE: usize = 0usize;

    // Provided methods
    fn init(&mut self, _order: usize, _base: usize) { ... }
    fn take(&mut self, _idx: usize) -> bool { ... }
}
Expand description

伙伴分配器的一个行。

Required Associated Constants§

Source

const EMPTY: Self

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

Provided Associated Constants§

Source

const INTRUSIVE_META_SIZE: usize = 0usize

侵入式元数据的大小。

Provided Methods§

Source

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

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

Source

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

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§