pub struct HttpIngress<R = ()> { /* private fields */ }Expand description
HTTP Ingress Circuit Builder.
Wires HTTP inputs to Ranvier Circuits. This is NOT a web server—it’s a circuit wiring tool.
Ingress is part of Schematic (separate layer: Ingress → Circuit → Egress)
Implementations§
Source§impl<R> HttpIngress<R>
impl<R> HttpIngress<R>
Sourcepub fn route<E>(
self,
path: impl Into<String>,
circuit: Axon<(), String, E, R>,
) -> Self
pub fn route<E>( self, path: impl Into<String>, circuit: Axon<(), String, E, R>, ) -> Self
Register a route with a circuit.
Sourcepub fn route_method<E>(
self,
method: Method,
path: impl Into<String>,
circuit: Axon<(), String, E, R>,
) -> Self
pub fn route_method<E>( self, method: Method, path: impl Into<String>, circuit: Axon<(), String, E, R>, ) -> Self
Sourcepub async fn run(self, resources: R) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn run(self, resources: R) -> Result<(), Box<dyn Error + Send + Sync>>
Run the HTTP server with required resources.
Sourcepub fn into_raw_service(self, resources: R) -> RawIngressService<R>
pub fn into_raw_service(self, resources: R) -> RawIngressService<R>
Convert to a raw Tower Service for integration with existing Tower stacks.
This is the “escape hatch” per Discussion 193:
“Raw API는 Flat API의 탈출구다.”
§Example
ⓘ
let ingress = Ranvier::http()
.bind(":3000")
.route("/", circuit);
let raw_service = ingress.into_raw_service();
// Use raw_service with existing Tower infrastructureTrait Implementations§
Auto Trait Implementations§
impl<R> Freeze for HttpIngress<R>
impl<R = ()> !RefUnwindSafe for HttpIngress<R>
impl<R> Send for HttpIngress<R>where
R: Send,
impl<R> Sync for HttpIngress<R>where
R: Sync,
impl<R> Unpin for HttpIngress<R>where
R: Unpin,
impl<R = ()> !UnwindSafe for HttpIngress<R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more