Expand description
Spanned<T> + garde / validator → miette::Report bridge.
Behind the miette Cargo feature; the actual conversion
functions are gated on miette + garde or miette + validator.
Spanned<T> + garde / validator → miette::Report
bridge.
Walks a validation error tree produced by garde::Report or
validator::ValidationErrors and emits a single
miette::Report whose source label points at the
corresponding Spanned<T> range — enabling beautiful,
line-and-column-precise output for declarative validation
failures.
Behind feature combinations:
garde_errors_to_mietterequiresmiette+gardevalidator_errors_to_mietterequiresmiette+validator
These functions are deliberately free-standing rather than
impls on crate::Spanned to keep the dependency surface
visible at the call site and avoid leaking miette into every
Spanned<T> user.
Functions§
- clamped_
span - Helper: clamp a span end so it never lands before its start.
Exposed for
crate::Spannedintegrations that compute their own byte range and want to plug straight into a miette source span without re-implementing the clamp. - garde_
errors_ to_ miette - Render a [
garde::Report] tree against aSpanned<T>payload as a [miette::Report]. - validator_
errors_ to_ miette - Render a [
validator::ValidationErrors] against aSpanned<T>payload as a [miette::Report].