Module kernel::prelude

source ·
Expand description

The kernel prelude.

These are the most common items used by Rust code in the kernel, intended to be imported by all Rust code, for convenience.

Examples

use kernel::prelude::*;

Re-exports

Macros

  • Asserts that a boolean expression is true at compile time.
  • Returns the currently running task.
  • Construct an in-place initializer for structs.
  • Construct an in-place, pinned initializer for structs.
  • Prints an alert-level message (level 1).
  • Prints a critical-level message (level 2).
  • Prints a debug-level message (level 7).
  • Prints an emergency-level message (level 0).
  • Prints an error-level message (level 3).
  • Prints an info-level message (level 6).
  • Prints a notice-level message (level 5).
  • Prints a warning-level message (level 4).
  • Static assert (i.e. compile-time assert).
  • Construct an in-place fallible initializer for structs.
  • Construct an in-place, fallible pinned initializer for structs.
This documentation is an old archive. Please see https://rust.docs.kernel.org instead.