[−][src]Crate mod_utilities
A collection of data structures, traits, and functions for use in mod engine / mod language
Re-exports
pub use wrapped_array::WrappedArray; |
Modules
| collections | General purpose collection data structures |
| temp | Thread local temporary allocations for use during conversions |
| wrapped_array | WrappedArray and support structures |
Macros
| breakable_block | A block with fallthrough capability |
| discard | Discards all syntax passed to it |
| discard_first | Discards the first comma separated syntax passed to it |
| err | Extract the value of a Result::Err or return from the current context |
| make_key_type | A wrapper macro to generate data and implementation for a unique Key type for use with SlotMaps |
| ok | Extract the value of a Result::Ok or return from the current context |
| some | Extract the value of an Option::Some or return from the current context |
| take_first | Helper macro that discards any content after the first |
Structs
| FMTAdaptor | A shim which translates an io::Write to a fmt::Write |
| IOAdaptor | A shim which translates a fmt::Write to a io::Write |
Enums
| Either | A wrapper for a value that is either one type or another |
Traits
| AllowIf | A trait that allows discarding Option values if some condition is or is not met |
| FMTAdaptable | Allows a io::Write to be routed to an fmt::Write |
| IOAdaptable | Allows a fmt::Write to be routed to an io::Write |
| IntoEither | Allows converting a value into some side of an Either |
| IntoResult | Allows the creation of a Result with a custom Err from a container type |
| POD | Convenient shortcut trait for guarding on types that implement all the standard deriveable traits |
| Reduce | Provides an iterator reduction method similar to Iterator::fold, but the accumulator is initialized by taking the first element of the iterator |
| Unref | Convenience trait to extract a copy of a value referenced in an Option or Result |
| UnwrapPretty | Convenience trait to unwrap and expect Results where the Err implements Display and can be printed prettier than with Err formatted with Debug |
| UnwrapUnchecked | Allows unsafely unwrapping a container value without checking if it is valid |
Functions
| count_digits | Determine how many digits it takes to represent a number |
| escape_str | Unescape special character sequences into their serialization-safe equivalent |
| escape_str_into | Unescape special character sequences into their serialization-safe equivalent |
| padding | Get a str filled with a given number of spaces, up to 256 |
| unescape_str | Unescape special character sequences into their literal equivalent |
| unescape_str_into | Unescape special character sequences into their literal equivalent |
| write_indent | Write |