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