pub unsafe trait Cores {
// Required method
fn core_index() -> usize;
}
Expand description
Trait abstracting how to get the index of the current CPU core.
§Safety
core_index
must never return the same index on different CPU cores.
Required Methods§
Sourcefn core_index() -> usize
fn core_index() -> usize
Returns the index of the current CPU core.
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.