Expand description
§ranvier-http - HTTP Ingress Adapter for Ranvier
This crate provides the Hyper 1.0 native boundary layer for Ranvier.
It implements Ranvier::http() as an Ingress Circuit Builder (Discussion 193).
§Key Components
Ranvier::http()- Entry point for building HTTP ingressHttpIngress- Builder for configuring routes and serverRanvierService- Hyper Service adapter for Axon execution
§Example
ⓘ
use ranvier_core::prelude::*;
use ranvier_http::prelude::*;
let hello = Axon::new("Hello")
.then(|_| async { "Hello, Ranvier!" });
Ranvier::http()
.bind("127.0.0.1:3000")
.route("/", hello)
.run()
.await?;Re-exports§
pub use extract::CookieJar;pub use extract::DEFAULT_BODY_LIMIT;pub use extract::ExtractError;pub use extract::FromRequest;pub use extract::Header;pub use extract::Json;pub use extract::Path;pub use extract::Query;pub use ingress::HttpIngress;pub use ingress::HttpRouteDescriptor;pub use ingress::PathParams;pub use ingress::Ranvier;pub use ingress::WebSocketConnection;pub use ingress::WebSocketError;pub use ingress::WebSocketEvent;pub use ingress::WebSocketSessionContext;pub use response::Html;pub use response::HttpResponse;pub use response::IntoResponse;pub use response::json_error_response;pub use response::outcome_to_response;pub use response::outcome_to_response_with_error;pub use service::RanvierService;pub use sse::Sse;pub use sse::SseEvent;pub use test_harness::TestApp;pub use test_harness::TestHarnessError;pub use test_harness::TestRequest;pub use test_harness::TestResponse;