Module prelude

Source
Expand description

Each module should have its own prelude, which:

  • Adds preludes of upstream crates
  • Exports types with specific-enough names which mean they can safely be used downstream.

The idea is that we can just include the current crate’s prelude and avoid messing around with tons of includes. This makes refactors easier, and makes integration into the node less painful.

Re-exports§

pub use crate::rust::prelude::*;
pub use crate::iterators::*;

Macros§

assert_matches
Attempts to be a replacement for assert!(matches!(...)) but with better error messages, and allowing further code on success.
labelled_resolvable_using_resolvable_impl
labelled_resolvable_with_identity_impl
resolvable_with_identity_impl
resolvable_with_try_into_impls

Structs§

ContextDisplayable

Traits§

ContextualDisplay
This trait is used where context is required to correctly display a value.
ContextualTryFrom
ContextualTryInto
LabelResolver
LabelledResolvable
LabelledResolvable is a marker trait, serving a few purposes:
LabelledResolve
This trait is intended to be used as an impl argument in helper methods, to accept a wider range of arguments.
LabelledResolveFrom
The inverse trait of LabelledResolve.
Resolvable
Resolvable is a marker trait, mainly to make resolution opt-in and to avoid polluting every type with a resolve method.
Resolve
This trait is intended to be used as an impl argument in helper methods, to accept a wider range of arguments.
ResolveFrom
The inverse trait of Resolve.

Functions§

combine
Combines a u8 with a u8 slice.
copy_u8_array
Copies a slice to a fixed-sized array.