ergonomic refactors: forward chaining, unified code= syntax, idiomatic conversions - #17
Open
ae2rs wants to merge 11 commits into
Open
ergonomic refactors: forward chaining, unified code= syntax, idiomatic conversions#17ae2rs wants to merge 11 commits into
ae2rs wants to merge 11 commits into
Conversation
…ServiceFailure<Outer>
…syntax Replace the two-key `category = X, code = Y` grammar with a single two-segment path `code = Category::GrpcCode`. The parser splits the path at `::` to derive both category and gRPC code; bare single-segment paths emit a clear error pointing to the expected form.
ae2rs
force-pushed
the
ae2rs/ergonomic-refactors
branch
from
May 26, 2026 15:29
514fd76 to
ea70d1f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#[aerro(forward)]+.forward()— cross-service error chaining: a variant can carry an upstreamServiceFailure<T>and transfer its frames automatically via.forward(), without manually copying framescode = Category::GrpcCodesyntax — replaced the two-fieldcategory = …, code = …grammar with a single two-segment path; all call sites migratedIntoStatus/StatusIntoResultExtextension traits with standardFrom<ServiceFailure<E>> for StatusandTryFrom<Status> for ServiceFailure<E>AerroEncodeextension trait — adds.encode()(zero-arg, default opts) and.encode_with_opts(opts)directly onE: AerroandServiceFailure<E>;EncodeOptionsonly appears at public-boundary call sitestrace_id/span_idat error creation timeTest plan
cargo test -p aerro— 35+ unit + integration + trybuild UI tests, all passcargo clippy -p aerro --all-targets --all-features -- -D warnings— cleancargo run --example basic,--example exposure,--example trace_chain,--example tracing— all run correctly🤖 Generated with Claude Code