Skip to main content

Module emit_api

Module emit_api 

Source
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.).

Structs§

BodyBinding
OpPlan
ParamBinding
RustBackendConfig
Captures the differences between Rust HTTP backends.
TypedResponse

Functions§

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, ... };
generate_api_files
Generate every API file from the IR.
is_copy_type
param_rust_type
pick_body_type
pick_response_type
plan_body
plan_operation
plan_response
render_to_string
response_field_name
sanitize_operation_id
status_match_pattern
Convert an OpenAPI status code string to a Rust match pattern.
unique_name