Crate core

Expand description

async fn serve(&self, Context<S>, Request) -> Result<Response, Error>

Crate used by the end-user rama crate and rama crate authors alike.

Learn more about rama:

§rama service

Heavily inspired by tower-service and the vast Tokio ecosystem which makes use of it.

Initially the goal was to rely on tower-service directly, but it turned out to be too restrictive and difficult to work with, for the use cases we have in Rama. See https://ramaproxy.org/book/faq.html for more information regarding this and more.

Modules§

combinators
Combinators for working with or in function of services.
context
Context passed to and between services as input.
error
Error utilities for rama and its users.
graceful
Shutdown management for graceful shutdown of async-first applications.
inspect
services to inspect requests and responses
layer
Layer type and utilities.
matcher
matcher utilities for any middleware where need to match on incoming requests within a given Context
rt
Runtime utilities used by Rama.
service
Service type and utilities.
telemetry
Rama telemetry modules.
username
Utilities to work with usernames and pull information out of it.

Structs§

Context
Context passed to and between services as input.

Traits§

Layer
A layer that produces a Layered service (middleware(inner service)).
Service
A Service that produces rama services, to serve requests with, be it transport layer requests or application layer requests.