Expand description
Re-exports either the Rust std
library or core
and alloc
when std
is
disabled.
crate::stdlib::...
should be used rather than std::
when adding code that
will be available with the standard library disabled.
Note that this module is called stdlib
rather than std
, as Rust 1.34.0
does not permit redefining the name stdlib
(although this works on the
latest stable Rust).
Modules§
- alloc πMemory allocation APIs.
- any πUtilities for dynamic typing or type reflection.
- arch πSIMD and vendor intrinsics module.
- array πUtilities for the array primitive type.
- ascii πOperations on ASCII strings and characters.
- backtrace πSupport for capturing a stack backtrace of an OS thread
- borrow πA module for working with borrowed data.
- boxed πThe
Box<T>
type for heap allocation. - cell πShareable mutable containers.
- char πUtilities for the
char
primitive type. - clone πThe
Clone
trait for types that cannot be βimplicitly copiedβ. - cmp πUtilities for comparing and ordering values.
- collections πCollection types.
- convert πTraits for conversions between types.
- default πThe
Default
trait for types with a default value. - env πInspection and manipulation of the processβs environment.
- error πInterfaces for working with Errors.
- f32 πConstants for the
f32
single-precision floating point type. - f64 πConstants for the
f64
double-precision floating point type. - ffi πUtilities related to FFI bindings.
- fmt πUtilities for formatting and printing
String
s. - fs πFilesystem manipulation operations.
- future πAsynchronous basic functionality.
- hash πGeneric hashing support.
- hint πHints to compiler that affects how code should be emitted or optimized. Hints may be compile time or runtime.
- Redundant constants module for the
i8
primitive type. - Redundant constants module for the
i16
primitive type. - Redundant constants module for the
i32
primitive type. - Redundant constants module for the
i64
primitive type. - Redundant constants module for the
i128
primitive type. - io πTraits, helpers, and type definitions for core I/O functionality.
- Redundant constants module for the
isize
primitive type. - iter πComposable external iteration.
- marker πPrimitive traits and types representing basic properties of types.
- mem πBasic functions for dealing with memory.
- net πNetworking primitives for TCP/UDP communication.
- num πAdditional functionality for numerics.
- ops πOverloadable operators.
- option πOptional values.
- os πOS-specific functionality.
- panic πPanic support in the standard library.
- path πCross-platform path manipulation.
- pin πTypes that pin data to a location in memory.
- prelude πThe Rust Prelude
- primitive πThis module reexports the primitive types to allow usage that is not possibly shadowed by other declared types.
- process πA module for working with processes.
- ptr πManually manage memory through raw pointers.
- rc πSingle-threaded reference-counting pointers. βRcβ stands for βReference Countedβ.
- result πError handling with the
Result
type. - slice πUtilities for the slice primitive type.
- str πUtilities for the
str
primitive type. - string πA UTF-8βencoded, growable string.
- sync πUseful synchronization primitives.
- task πTypes and Traits for working with asynchronous tasks.
- thread πNative threads.
- time πTemporal quantification.
- Redundant constants module for the
u8
primitive type. - Redundant constants module for the
u16
primitive type. - Redundant constants module for the
u32
primitive type. - Redundant constants module for the
u64
primitive type. - Redundant constants module for the
u128
primitive type. - Redundant constants module for the
usize
primitive type. - vec πA contiguous growable array type with heap-allocated contents, written
Vec<T>
. - Unstable module containing the unstable
assert_matches
macro. - Composable asynchronous iteration.
- Constants for the
f16
double-precision floating point type. - Constants for the
f128
double-precision floating point type. - Compiler intrinsics.
- Helper module for exporting the
pattern_type
macro - Portable SIMD module.
Macros§
- assert πAsserts that a boolean expression is
true
at runtime. - assert_eq πAsserts that two expressions are equal to each other (using
PartialEq
). - assert_ne πAsserts that two expressions are not equal to each other (using
PartialEq
). - cfg πEvaluates boolean combinations of configuration flags at compile-time.
- column πExpands to the column number at which it was invoked.
- compile_error πCauses compilation to fail with the given error message when encountered.
- concat πConcatenates literals into a static string slice.
- dbg πPrints and returns the value of a given expression for quick and dirty debugging.
- debug_assert πAsserts that a boolean expression is
true
at runtime. - debug_assert_eq πAsserts that two expressions are equal to each other.
- debug_assert_ne πAsserts that two expressions are not equal to each other.
- env πInspects an environment variable at compile time.
- eprint πPrints to the standard error.
- eprintln πPrints to the standard error, with a newline.
- file πExpands to the file name in which it was invoked.
- format πCreates a
String
using interpolation of runtime expressions. - format_args πConstructs parameters for the other string-formatting macros.
- include πParses a file as an expression or an item according to the context.
- include_bytes πIncludes a file as a reference to a byte array.
- include_str πIncludes a UTF-8 encoded file as a string.
- A macro to test at runtime whether a CPU feature is available on x86/x86-64 platforms.
- line πExpands to the line number on which it was invoked.
- matches πReturns whether the given expression matches the provided pattern.
- module_path πExpands to a string that represents the current module path.
- option_env πOptionally inspects an environment variable at compile time.
- panic πPanics the current thread.
- print πPrints to the standard output.
- println πPrints to the standard output, with a newline.
- stringify πStringifies its arguments.
- thread_local πDeclare a new thread local storage key of type
std::thread::LocalKey
. - todo πIndicates unfinished code.
- Unwraps a result or propagates its error.
- unimplemented πIndicates unimplemented code by panicking with a message of βnot implementedβ.
- unreachable πIndicates unreachable code.
- vec πCreates a
Vec
containing the arguments. - write πWrites formatted data into a buffer.
- writeln πWrite formatted data into a buffer, with a newline appended.
- A macro for defining
#[cfg]
match-like statements. - Concatenates literals into a byte slice.
- Concatenates identifiers into one identifier.
- Same as
format_args
, but can be used in some const contexts. - Same as
format_args
, but adds a newline in the end. - Prints passed tokens into the standard output.
- Enables or disables tracing functionality used for debugging other macros.