axum-syntax-extractors

Guide Axum handler argument design with extractor ordering rules.

Updated May 20, 2026
One-click install
npx skills add https://github.com/Impertio-Studio/Axum-Claude-Skill-Package --skill axum-syntax-extractors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axum-syntax-extractors
Source: https://github.com/Impertio-Studio/Axum-Claude-Skill-Package/tree/main/skills/source/axum-syntax/axum-syntax-extractors
Command: npx skills add https://github.com/Impertio-Studio/Axum-Claude-Skill-Package --skill axum-syntax-extractors

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents common Axum handler failures by guiding you to choose the correct extractor types and place them in the required order so requests deserialize and reject consistently instead of failing with opaque Handler trait errors.

Core Features & Use Cases

  • Correct extractor selection: Use FromRequestParts for path/query/headers/state/extension and FromRequest for the single body extractor (Json, Form, Bytes, String, or Request).
  • Deterministic ordering rules: Ensures all FromRequestParts arguments come before exactly one body extractor, which must be last.
  • Axum 0.7 vs 0.8 correctness: Covers the route-capture syntax differences that affect Path deserialization while keeping extractor usage consistent.
  • Safe optional and explicit failure handling: Explains Axum 0.8 Option<Extractor> absent-vs-invalid semantics and when to use Result<Extractor, Rejection> to inspect rejection details.
  • Practical deserialization patterns: Covers Path<T> shapes (primitive, tuple, struct, map) and how query and JSON behave, including Content-Type requirements.

Quick Start

Ask the AI to rewrite your handler signature to use Path, Query, State, Extension, and a single last body extractor (Json/Form) according to Axum 0.7/0.8 rules, and to diagnose any “Handler is not satisfied” error.

Frequently Asked Questions about axum-syntax-extractors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my Axum handler fail with a "Handler is not satisfied" error?

Axum handler errors occur when multiple body extractors are used or extractors are ordered incorrectly. You must place all FromRequestParts extractors like Path and Query before exactly one body extractor like Json or Form, which must be last.

How do I order extractors in an Axum route handler?

To order Axum extractors correctly, place all FromRequestParts extractors such as State, Path, Query, and Extension first. Follow these with exactly one FromRequest body extractor like Json, Bytes, or Request as the final argument.

How does Axum 0.8 Option and Result extractor semantics work?

Axum 0.8 Option and Result extractors distinguish between absent and invalid inputs. Option returns None if a request part is missing, while Result captures rejection details to inspect whether input was missing versus invalid, preventing opaque compile-time Handler errors.

Can I parse multiple body types like JSON and Form in the same Axum handler?

You cannot parse multiple body types in the same Axum handler because only one FromRequest extractor is allowed per signature. The body is consumed once, so you must select a single body extractor like Json, Form, Bytes, or String as the final argument.

How do I use Path extractor for route parameters in Axum 0.7 and 0.8?

To use the Path extractor in Axum 0.7 and 0.8, apply version-aware route-capture syntax for deserialization. You can capture path parameters into primitive types, tuples, structs, or maps while keeping the Path extractor as a FromRequestParts argument before the body extractor.