Skip to main content

CpuId

Trait CpuId 

Source
pub trait CpuId {
    // Required method
    fn current_cpu() -> usize;
}
Expand description

Strategy for mapping the calling CPU to a slot index.

Implement this trait to tell the allocator on which CPU he is on (the returned value is viewed a hint).

Required Methods§

Source

fn current_cpu() -> usize

A stable per-CPU index for the calling CPU.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§