Skip to main content

Module axum_helpers

Module axum_helpers 

Source
Expand description

Make all of lexe_api_core available under [lexe_api].

NOTE: Any crates which can depend on lexe_api_core directly (without lexe-api) should do so to avoid [lexe_api] dependencies. Axum helpers which must live in lexe_api_core because its dependents do.

Functions§

build_json_response
Constructs a JSON http::Response<axum::body::Body> from the data and status code. If serialization fails for some reason (very unlikely), log and return a ErrorResponse containing a CommonErrorKind::Server along with the associated StatusCode.
default_response_builder
A builder for a http::Response with Lexe’s defaults set.