Expand description
The rmx
prelude.
Re-exports§
pub use ::anyhow::Context as _;
pub use ::itertools::Itertools as _;
pub use crate::extras::default;
pub use crate::extras::S;
pub use crate::extras::O;
pub use crate::extras::QuickToString as _;
pub use crate::extras::QuickToOwned as _;
pub use crate::extras::QuickClone as _;
pub use crate::extras::OptionExpect as _;
pub use crate::extras::ResultExpect as _;
pub use crate::extras::AnyResultExpect as _;
pub use crate::extras::ResultIgnore as _;
pub use crate::extras::RangeExt as _;
Modules§
- Asynchronous values.
- Asynchronous sinks.
- Asynchronous streams.
- A contiguous growable array type with heap-allocated contents, written
Vec<T>
.
Macros§
- Construct an ad-hoc error from a string or existing non-
anyhow
error value. - Construct an ad-hoc error from a string or existing non-
anyhow
error value. - Asserts that a boolean expression is
true
at runtime. - Return early with an error.
- Like ‘unimplemented’ but shorter to type.
- Evaluates boolean combinations of configuration flags at compile-time.
- The main macro provided by this crate. See crate documentation for more information.
- Expands to the column number at which it was invoked.
- Causes compilation to fail with the given error message when encountered.
- Concatenates literals into a static string slice.
- Logs a message at the debug level.
- Inspects an environment variable at compile time.
- Logs a message at the error level.
- Expands to the file name in which it was invoked.
- Creates a
String
using interpolation of runtime expressions. - Constructs parameters for the other string-formatting macros.
- Parses a file as an expression or an item according to the context.
- Includes a file as a reference to a byte array.
- Includes a UTF-8 encoded file as a string.
- Logs a message at the info level.
- Expands to the line number on which it was invoked.
- Expands to a string that represents the current module path.
- Optionally inspects an environment variable at compile time.
- Stringifies its arguments.
- Logs a message at the trace level.
- Creates a
Vec
containing the arguments. - Logs a message at the warn level.
- concat_
bytes Experimental Concatenates literals into a byte slice. - concat_
idents Experimental Concatenates identifiers into one identifier. - deref
Experimental Unstable placeholder for deref patterns. - format_
args_ nl Experimental Same asformat_args
, but adds a newline in the end. - log_
syntax Experimental Prints passed tokens into the standard output. - trace_
macros Experimental Enables or disables tracing functionality used for debugging other macros. - type_
ascribe Experimental Unstable placeholder for type ascription.
Structs§
- The
Error
type, a wrapper around a dynamic error type. - A pointer type that uniquely owns a heap allocation of type
T
. - A UTF-8–encoded, growable string.
- A contiguous growable array type, written as
Vec<T>
, short for ‘vector’.
Enums§
- Combines two different futures, streams, or sinks having the same associated types into a single type.
- The
Option
type. See the module level documentation for more. - An
Ordering
is the result of a comparison between two values.
Traits§
- Used to do a cheap mutable-to-mutable reference conversion.
- Used to do a cheap reference-to-reference conversion.
- Read bytes asynchronously.
- Read bytes asynchronously.
- Seek bytes asynchronously.
- Write bytes asynchronously.
- A common trait for the ability to explicitly duplicate an object.
- Types whose values can be duplicated simply by copying bits.
- A trait for giving a type a useful default value.
- An iterator able to yield elements from both ends.
- Custom code within the destructor.
- Trait for comparisons corresponding to equivalence relations.
- An iterator that knows its exact length.
- Extend a collection with the contents of an iterator.
- The version of the call operator that takes an immutable receiver.
- The version of the call operator that takes a mutable receiver.
- The version of the call operator that takes a by-value receiver.
- Used to do value-to-value conversions while consuming the input value. It is the reciprocal of
Into
. - Conversion from an
Iterator
. - A future represents an asynchronous computation obtained by use of
async
. - A value-to-value conversion that consumes the input value. The opposite of
From
. - Conversion into an
Iterator
. - A trait for dealing with iterators.
- Trait for types that form a total order.
- Trait for comparisons using the equality operator.
- Trait for types that form a partial order.
- Types that can be transferred across thread boundaries.
- A
Sink
is a value into which other values can be sent, asynchronously. - Types with a constant size known at compile time.
- A stream of values produced asynchronously.
- Types for which it is safe to share references between threads.
- A generalization of
Clone
to borrowed data. - A trait for converting a value to a
String
. - Simple and safe type conversions that may fail in a controlled way under some circumstances. It is the reciprocal of
TryInto
. - A convenience for futures that return
Result
values that includes a variety of adapters tailored to such futures. - An attempted conversion that consumes
self
, which may or may not be expensive. - A convenience for streams that return
Result
values that includes a variety of adapters tailored to such futures. - Types that do not require any pinning guarantees.
- An extension trait for
Future
s that provides a variety of convenient adapters.
Functions§
- Returns the ABI-required minimum alignment of a type in bytes.
- Returns the ABI-required minimum alignment of the type of the value that
val
points to in bytes. - Run a future to completion on the current thread.
- Disposes of a value.
- Returns the size of a type in bytes.
- Returns the size of the pointed-to value in bytes.
Type Aliases§
Result<T, Error>
Attribute Macros§
- Attribute macro used to apply derive macros.
- Declares an extension trait
- Attribute macro applied to a static to register it as a global allocator.
- Attribute macro applied to a function to turn it into a unit test.
- alloc_
error_ handler Experimental Attribute macro applied to a function to register it as a handler for allocation failure. - bench
Experimental Attribute macro applied to a function to turn it into a benchmark test. - cfg_
accessible Experimental Keeps the item it’s applied to if the passed path is accessible, and removes it otherwise. - cfg_
eval Experimental Expands all#[cfg]
and#[cfg_attr]
attributes in the code fragment it’s applied to. - derive_
const Experimental Attribute macro used to apply derive macros for implementing traits in a const context. - test_
case Experimental An implementation detail of the#[test]
and#[bench]
macros.
Derive Macros§
- Derive macro generating an impl of the trait
Clone
. - Derive macro generating an impl of the trait
Copy
. - Derive macro generating an impl of the trait
Debug
. - Derive macro generating an impl of the trait
Default
. - Derive macro generating an impl of the trait
Eq
. - Derive macro generating an impl of the trait
Hash
. - Derive macro generating an impl of the trait
PartialOrd
. The behavior of this macro is described in detail here.