Skip to main content

Platform

Trait Platform 

Source
pub trait Platform {
    // Required methods
    fn cpu_count(&self) -> usize;
    fn total_memory(&self) -> u64;
    fn halt(&self) -> !;
}
Expand description

Top-level platform discovery and initialization.

Required Methods§

Source

fn cpu_count(&self) -> usize

Return the number of physical CPUs available.

Source

fn total_memory(&self) -> u64

Return the total physical memory in bytes.

Source

fn halt(&self) -> !

Halt the current CPU.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§