axum-body-split 0.1.0

A library to use multiple FromRequest extractors in axum
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 19.74 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.69 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 54s Average build duration of successful builds.
  • all releases: 54s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • lukas0008/axum-body-split
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • lukas0008

Axum Body Split

Tiny library to fix my annoyance with axum, where I sometimes just want a quick and dirty way to use an extractor implementing FromRequest twice.

Usage

Usage is like of any other extractor, but you need to add your state type as a type parameter (because FromRequest has access to the state, so it needs to know what type it is)

Example without state:

SplitBody(Json(json), text, _): SplitBody<Json<RequestJson>, String, ()>

Example with state:

SplitBody(Json(json), text, _): SplitBody<Json<RequestJson>, String, AppState>

Examples

check out examples for examples of how to use this