pub fn service_transport<S, B>(service: S) -> impl FetchTransportExpand description
Serve host fetches with a Tower service, such as an axum Router.
The same service can serve public HTTP and in-process fetches from
JavaScript. Requests keep their method, absolute URI, headers, body and
extensions, so handlers read the trusted fetchlet::Context from the
extensions when the route receives it (see
fetchlet::OriginRouter::internal). In-process requests carry no
connection data; handlers that need it should get it from the Context.
Response bodies stream back to JavaScript. Dropping the fetch drops the
service future. A service error rejects the fetch with a general transport
error; its detail stays in Rust.