Skip to main content

Crate connect2axum

Crate connect2axum 

Source
Expand description

Runtime helpers for generated REST/OpenAPI endpoint wrappers over ConnectRPC services.

Re-exports§

pub use streaming::http::ndjson_request_stream;
pub use streaming::http::stream_response;
pub use streaming::ws::close_ws;
pub use streaming::ws::connect_error_to_ws_close_frame;
pub use streaming::ws::make_ws_request;
pub use streaming::ws::make_ws_stream_request;
pub use streaming::ws::process_ws_response;
pub use streaming::ws::process_ws_stream_response;
pub use streaming::ws::upgrade_to_ws;

Modules§

streaming
Streaming helpers for generated Axum adapters.

Structs§

JsonCompatibleView
Wraps a response body so JSON encoding can fall back through the Buffa owned message when the inner body is a view.
JsonLines
A stream of newline delimited JSON.

Constants§

VERSION
The crate version, as declared by Cargo.

Functions§

error_response
Converts a Connect error into an HTTP JSON error response.
json_compatible_view
Creates a JsonCompatibleView response wrapper.
json_owned_view
Deserializes ProtoJSON into a Buffa owned message and converts it to an OwnedView.
json_response
Converts a successful Connect response into a JSON HTTP response.
owned_view
Converts an owned Buffa message into the OwnedView<...View<'static>> request type expected by generated Connect service traits.
request_context
Converts the parts of an HTTP request into a ConnectRPC request context.
service_response
Converts a Connect service result into a JSON HTTP response.