Crate eiffel_macros

source ·
Expand description

§Submodule for Eiffel Inspired Invariant Checking Macros

This submodule is part of a larger crate that provides features inspired by the Eiffel programming language’s invariant checking. These features include checks for loops, entry, exit, and more.

This submodule specifically provides the standard macros, as the main crate cannot mix standard macros with procedural macros due to Cargo’s restrictions.

The Eiffel language’s options for invariant checking serve as the basis for the design and functionality of the macros in this submodule.

Please note that this submodule, like the main crate, is still a work in progress. As such, some features may not be fully implemented or may undergo significant changes in future updates.

Contributions and feedback are always welcome.

Macros§

  • require is a macro that checks if a given condition is met. If the condition is not met, the macro will cause the program to panic with a specified message.
  • require_or_err is a macro that checks if a given condition is met. If the condition is not met, the macro will return an error of type PreconditionFailedError with a specified message.

Structs§