Expand description
API emission for IR operations (Rust APIs).
Groups operations by tag, emits one apis/<tag>.rs per tag group. Each file
declares a {Tag}Api struct holding a &runtime::Client and exposes one
method per operation.
Backend-specific method bodies are injected via a closure, keeping this module agnostic to the HTTP library (reqwest, ureq, aioduct, etc.).
Re-exports§
pub use crate::generators::multipart::MultipartPart;pub use crate::generators::multipart::MultipartValueEncoding;
Structs§
- Body
Binding - Error
Response - OpPlan
- Param
Binding - Rust
Backend Config - Captures the differences between Rust HTTP backends.
- Typed
Response
Enums§
Functions§
- binary_
field_ expr - binary_
filename_ expr - emit_
empty_ result_ init - emit_
error_ enum - emit_
error_ response_ match - emit_
response_ match - Emit
match status_code { ... }dispatching deserialized bodies into result fields. - emit_
response_ struct - emit_
result_ init - Emit
let mut result = FooResponse { status_code, field1: None, ... }; - error_
response_ value_ expr - generate_
api_ files - Generate every API file from the IR.
- is_
copy_ type - is_
success_ status - optional_
binary_ field_ expr - optional_
binary_ filename_ expr - optional_
text_ field_ expr - param_
rust_ type - pick_
body_ type - pick_
response_ type - plan_
body - plan_
error_ response - plan_
operation - plan_
response - render_
to_ string - response_
field_ name - response_
headers_ init - Clone the native response header map before the response body is consumed.
- response_
needs_ bytes - response_
value_ expr - response_
value_ expr_ from_ str - rust_
field_ name - rust_
string_ literal - sanitize_
operation_ id - status_
match_ pattern - Convert an OpenAPI status code string to a Rust match pattern.
- text_
field_ expr - unique_
name