Module std::macros[src]

Standard library macros

This modules contains a set of macros which are exported from the standard library. Each macro is available for use when linking against the standard library.

Modules

builtin

Built-in macros to the compiler itself.

Macros

assert!

Ensure that a boolean expression is true at runtime.

assert_eq!

Asserts that two expressions are equal to each other, testing equality in both directions.

debug_assert!

Ensure that a boolean expression is true at runtime.

debug_assert_eq!

Asserts that two expressions are equal to each other, testing equality in both directions.

fail!

The entry point for failure of rust tasks.

format!

Use the syntax described in std::fmt to create a value of type String. See std::fmt for more information.

local_data_key!

Declare a task-local key with a specific type.

print!

Equivalent to the println! macro except that a newline is not printed at the end of the message.

println!

Macro for printing to a task's stdout handle.

select!

A macro to select an event from a number of receivers.

try!

Helper macro for unwrapping Result values while returning early with an error if the value of the expression is Err. For more information, see std::io.

unimplemented!

A standardised placeholder for marking unfinished code. It fails with the message "not yet implemented" when executed.

unreachable!

A utility macro for indicating unreachable code. It will fail if executed. This is occasionally useful to put after loops that never terminate normally, but instead directly return from a function.

vec!

Create a std::vec::Vec containing the arguments.

write!

Use the format! syntax to write data into a buffer of type &mut Writer. See std::fmt for more information.

writeln!

Equivalent to the write! macro, except that a newline is appended after the message is written.