Module std::prelude

Items available everywhere without having to use them

This file is the similar to the Rust's "prelude", items defined here are available in the root lexical-scope, so they are available everywhere (but can be shadowed by local definitions).

In general, prelude should only contain use aliases to items defined elsewhere.

Builtin types

Unit type (())
Boolean type
u8
8-bit unsigned integer (byte)
u16
16-bit unsigned integer
u32
32-bit unsigned integer
u64
64-bit unsigned integer
128-bit unsigned integer
Native unsigned integer (machine word)
i8
Signed 8-bit integer
i16
Signed 16-bit integer
i32
Signed 32-bit integer
i64
Signed 64-bit integer
Signed 128-bit integer
Native signed integer (machine word)
f32
Single precision floating point type
f64
Double precision floating point type

Structs

A placeholder for the Self type in the protocol of a dyn object.
Coroutine object
Optional value
Either a success value or an error value.

Macros

Ungracefully terminate the thread or process with an error message.
Prints a formatted string to standard output.
Causes the compilation to fail if reached.
try
Extract the success value or short-circuit the calling function.
Prints a formatted string to standard output with newline.
Prints a formatted string to standard error.
Panics if cond evaluates to false.
Prints a formatted string to standard error with newline.
Panics if lhs and rhs are not equal.
Panics if lhs and rhs are equal.
Treats the location as unreachable during program flow.
dbg
A helper for printing a value of a subexpression for debugging purposes.