Skip to main content

Crate rustack_apigatewayv2_http

Crate rustack_apigatewayv2_http 

Source
Expand description

API Gateway v2 HTTP service layer for Rustack.

This crate implements the restJson1 protocol for API Gateway v2, providing:

  • Router: Dispatches by HTTP method + URL path
  • Handler trait: Defines the boundary between HTTP and business logic
  • Service: Hyper Service implementation for the API Gateway v2 protocol
  • Response helpers: JSON success/error response formatting

API Gateway v2 uses REST-style routing where each operation has a unique method + path combination. Path parameters (e.g., {apiId}) are extracted and passed to the handler.

§Error format

API Gateway v2 errors use a JSON body with a lowercase message field: {"message": "..."}

Re-exports§

pub use body::ApiGatewayV2ResponseBody;
pub use dispatch::ApiGatewayV2Handler;
pub use dispatch::NotImplementedHandler;
pub use router::PathParams;
pub use service::ApiGatewayV2HttpConfig;
pub use service::ApiGatewayV2HttpService;

Modules§

body
API Gateway v2 HTTP response body type.
dispatch
API Gateway v2 handler trait and operation dispatch.
response
API Gateway v2 response serialization and error formatting.
router
API Gateway v2 URL router.
service
API Gateway v2 HTTP service implementing the hyper Service trait.