Module r3::kernel::prelude

source ·
Expand description

The prelude module. This module re-exports Kernel and other extension traits with impl-only-use (use ... as _, RFC2166).

Rationale: A prelude module is usually imported with a wildcard import (use ...::prelude::*). Name collisions caused by a wildcard import are difficult to notice (but cause a very confusing error) and fragile against otherwise-harmless upstream changes because imported names are not explicitly spelled in the source code.

Kernel is not designed to be used in trait bounds, and system types are not supposed to have an associated function conflicting with those from Kernel. For these reasons, it’s mostly useless to import the name Kernel.

Traits

The supported operations on EventGroupHandle.
The supported operations on MutexHandle.
The supported operations on SemaphoreHandle.
The supported operations on TaskHandle.
The supported operations on TimerHandle.
Provides access to the global functionalities of a kernel.
The trait for safe wrappers of System::RawEventGroupId, i.e., EventGroup and EventGroupRef.
The trait for safe wrappers of System::RawMutexId, i.e., Mutex and MutexRef.
The trait for safe wrappers of System::RawSemaphoreId, i.e., Semaphore and SemaphoreRef.
The trait for safe wrappers of System::RawTaskId, i.e., Task and TaskRef.
The trait for safe wrappers of System::RawTimerId, i.e., Timer and TimerRef.