Crate ez

source · []
Expand description

A collection of easy-to-use, beginner-friendly utilities for Rust.

⚠️ WARNING: THIS CRATE MAY BE INCOMPLETE AND UNSTABLE UNTIL v0.1.0!

Modules

File IO.

Generate random numbers (and bools) using the rand crate.

IO using stdin, stdout, and stderr. Used for terminal IO, etc.

Implementation of ezio traits for strings. Useful for mocking and other test usage of ezio in tests.

Macros

Returns from the enclosing function with an error value or error message.

Structs

A dynamic error reporting type.

Functions

Get a handle to stderr.

Get a handle to stdin.

Get a handle to stdout.

Attribute Macros

Decorates a main entry point function to configure some standard capabilities such as logging and error reporting, and adds some other conveniences.

Decorates a function so that it implicitly wraps the result in Result::Ok, unless a Result::Err is propagated with the ? operator or returned with the throw! macro.

A variation of the #[throws] attribute that creates two copies of the decorated function. One will use the function name and signature as-written, panicking if an error is encountered, while the other will add a try_ prefix to the function name and return a Result instead.