alux-http-text 0.1.1

Text and metadata interpretation of ALUX typed HTTP programs
Documentation
  • Coverage
  • 100%
    19 out of 19 items documented0 out of 18 items with examples
  • Size
  • Source code size: 21.51 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 770.81 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • tgrospic

alux-http-text

alux-http-text interprets an alux-http program as a readable description of its route surface. It executes no handler, so it witnesses that a typed HTTP program denotes selectors, extractor roles, arguments, results, and output conversions rather than framework callbacks.

use alux_http::HttpProgramExt;
use alux_http_text::TextHandlerImpl;

let api = TextHandlerImpl;
let routes = api.compile_http(api.status_api::<App>());

assert_eq!(routes.labels(), ["GET /status"]);
println!("{}", routes.lines().join("\n"));

The same program value compiles through any other interpreter, such as alux-http-poem, without restating its routes.