devela::code

Module util

Source
Expand description

Utility macros and hint functions.

Extends: std::{hint}


Macros§

  • A helper for constructing macro constants.
  • core Asserts that a boolean expression is true at runtime.
  • Asserts the approximate equality of a series of expressions within tolerance.
  • core Asserts that two expressions are equal to each other.
  • Asserts the equality of a series of expressions.
  • core Asserts that two expressions are not equal to each other.
  • Captures the first token from a list of inputs.
  • Captures the last token from a list of inputs.
  • Captures all the tokens except the first one, as a tuple.
  • cdbgstd
    customizable dbg! macro.
  • core Evaluates boolean combinations of configuration flags at compile-time.
  • A macro for defining #[cfg] if-else statements.
  • A for loop that is usable in compile-time contexts.
  • devela_macros Evaluates to either a true of false literal based on the predicate.
  • devela_macros Returns the first non-empty argument.
  • core Expands to the column number at which it was invoked.
  • core Expands to the file name at which it was invoked.
  • core Expands to the line number at which it was invoked.
  • core Expands to a string representing the current module path.
  • core Concatenates literals into a static string slice.
  • Asserts various comparisons on constants.
  • core Asserts that a boolean expression is true at runtime.
  • core Asserts that two expressions are equal to each other.
  • core Asserts that two expressions are not equal to each other.
  • Configures a feature as deprecated, warning if it is enabled.
  • devela_macros Generates a unit-only enum with variants associated to a specified range.
  • enumset_bit_·
    Defines an enum and an associated type set of its variants.
  • devela_macros Generates an expression for accessing a field of a tuple or struct.
  • Defines a constant for every given identifier with a value of its index in the list.
  • devela_macros Returns the total number of identifiers in its input.
  • devela_macros Returns the numbers of both total and unique identifiers in its input.
  • devela_macros Returns the number of unique identifiers in its input.
  • inline if macro.
  • A helper macro to concisely implement a few common utility traits.
  • core Parses a file as an expression or an item according to the context.
  • core Includes a file as a reference to a byte array.
  • Includes a Rust source file relative to the project’s directory.
  • core Includes a UTF-8 encoded file as a string.
  • Groups items together and expands them as if they were written directly.
  • Declares a module by including a Rust source file relative to the project’s directory.
  • paste Allows to paste identifiers together.
  • skip formatting wrapper macro.
  • core Stringifies its arguments.

Functions§

  • core Makes a soundness promise to the compiler that the condition holds.
  • core Hints the compiler to be maximally pessimistic about what black_box could do.
  • core Signals the processor that it is running in a busy-wait spin-loop.
  • core Informs the compiler that the current calling site is not reachable.

Attribute Macros§

  • devela_macros Conditionally compiles the thing it is attached to based on the predicate.
  • devela_macros Conditionally compiles the given attributes based on the predicate.
  • autodiffExperimentalnightly_autodiff
    core Automatic Differentiation macro.