Module std::prelude
[−]
[src]
The Rust Prelude
Because std
is required by most serious Rust software, it is
imported at the topmost level of every crate by default, as if the
first line of each crate was
extern crate std;
This means that the contents of std can be accessed from any context
with the std::
path prefix, as in use std::vec
, use std::thread::spawn
,
etc.
Additionally, std
contains a prelude
module that reexports many of the
most common traits, types and functions. The contents of the prelude are
imported into every module by default. Implicitly, all modules behave as if
they contained the following prologue:
use std::prelude::v1::*;
The prelude is primarily concerned with exporting traits that are so pervasive that it would be obnoxious to import for every use, particularly those that define methods on primitive types.
Modules
v1 |
The first version of the prelude of The Rust Standard Library. |