Run time glue code (program entrypoint, tests, ...)
Modules
Structs
Coroutine object
Functions
-
fn in_const_context() -> bool
Returns
true
when evaluated in a const context andfalse
otherwise.Example
use std::runtime::in_const_context; const IN_CONST_CONTEXT: bool = in_const_context(); assert!(IN_CONST_CONTEXT); assert!(!in_const_context());
Run this example -
fn return_address() -> &void
-
fn in_coroutine() -> bool
Returns
true
if the current code is running in a coroutine.Example
use std::runtime::in_coroutine; fn* gen() -> Coroutine<bool> { yield in_coroutine(); } let gen = gen(); defer gen.free(); assert!(!in_coroutine()); assert!(gen.next().unwrap());
Run this example
Macros
Returns
true
when the argument is an expression that can be evaluated
at compile time.
Forces the evaluation of the argument at compile time.