Expand description
A collection of well-tested primitives that have been useful. Most modules stand alone.
Modules§
- any
- Methods that build upon the
Anytrait. - cast
- Cast between types with no conversion.
- cell
- Additions to the
Refmechanism. - cmp
- Traits to help implementing dynamic comparisons.
- coerce
- A trait to represent zero-cost conversions.
- display
- Provides utilities to implement
Display, which also provides an “alternate” display. - dupe
- A cheap version of
Clone. - file
- File/IO operations.
- hash
- Utilities for working with hashes.
- phantom
- Additional
PhantomDatarelated types. - prelude
- Standard functions. Usually imported with
use gazebo::prelude::*. - types
- Operations working on Rust types.
- variants
- Working with the variants of an
enum.
Macros§
- cmp_
chain - Performs a chain of comparison operation expressions yielding
std::cmp::Ordering, supporting early exit upon hitting the first expressions that doesn’t yieldstd::cmp::Ordering::Equaland returning the result of that. This is useful for easily writing a sequence of expressions necessary to yield a comparison result. The macro is expanded inplace, so any expressions dealing withResulttypes are allowed provided that the larger scope allows returning result. - eq_
chain - Performs a chain of equals operation expressions yielding
bool, supporting early exit upon hitting the first expressions that returnsfalseand returningfalse. This is useful for easily writing a sequence of equals expressions necessary to yield aboolThe macro is expanded inplace, so any expressions dealing withResulttypes are allowed provided that the larger scope allows returning result. - transmute
transmute!(from-type, to-type, value)will do atransmute, but the original and result types must be specified.
Functions§
- terminate_
on_ panic - Causes Rust to exit the process when any panic occurs.
An alternative is to compile your binary and all dependencies
with
-Cpanic=abort, which will provide similar behavior and smaller libraries.