Skip to main content

Crate lexe_std

Crate lexe_std 

Source
Expand description

§lexe-std

This crate contains “std extensions” which other Lexe crates can use without having to pull in any dependencies.

Traits, macros, copies of unstable std APIs, a small number of types, are all fair game so long as they do NOT depend on anything outside of std.

Modules§

array
[u8; N] array functions. Small helper functions for [u8; N] arrays.
backoff
Exponential backoff.
const_utils
Utilities for use in const fns and expressions. Utilities for use in const fns and expressions.
fmt
fmt extensions.
iter
Iterator extensions.
path
Path extensions.
string
String utilities. String utilities.

Macros§

const_assert
Assert at compile that that a boolean expression evaluates to true. Implementation copied from the static_assertions crate.
const_assert_mem_size
Assert at compile time that a type has a specific in-memory size in bytes.
const_assert_usize_eq
Assert at compile time that two usize values are equal. This assert has a nice benefit where there compiler error will actually print out the two values.
const_concat_bytes
Easily concatenate multiple const &[u8] slices into a single const &[u8].
const_concat_str
Easily concatenate multiple const &str slices into a single const &str.

Traits§

Apply
A trait which allows us to apply functions (including tuple enum variants) to non-Iterator/Result/Option values for cleaner iterator-like chains. It exposes an apply method and is implemented for all T.