Skip to main content

Crate soaprs_http

Crate soaprs_http 

Source
Expand description

Transport-neutral HTTP service-provider interface.

Framework, authentication, rate-limit, schema, documentation, and telemetry packages share these endpoint declarations and request/response effects. Concrete handlers, body extractors, routers, servers, and runtimes stay in adapter crates.

Structs§

AuthChallenge
Structured WWW-Authenticate challenge.
AuthorizationName
Stable authentication strategy, authorization policy, role, or permission name.
BodyLimitPolicy
Maximum accepted request body size.
ContractId
Logical request or response contract identity resolved by validation and schema adapters.
CorsPolicy
Declarative cross-origin resource-sharing policy.
DefaultHttpErrorMapper
Default stable error mapper used by framework adapters unless overridden.
EndpointCatalog
Ordered endpoint catalog with duplicate identity and route-shape detection.
EndpointContracts
Request and response contracts attached to one endpoint.
EndpointGroup
Endpoint group that applies a route prefix and shared safe defaults.
EndpointId
Stable endpoint identity used by adapters, documentation, and telemetry.
EndpointMetadata
Portable endpoint definition consumed by framework, auth, docs, and telemetry adapters.
HeaderMap
A specialized multimap for header names and values.
HeaderName
Represents an HTTP header field name
HeaderValue
Represents an HTTP header field value.
HstsPolicy
HTTP Strict Transport Security declaration.
HttpErrorBody
Serializer-neutral safe error response body.
HttpErrorResponse
Complete serializer-neutral HTTP error response.
HttpRequestParts
Owned neutral request parts useful for adapter composition and tests.
HttpResponseEffects
Headers, cookies, status, and redirects emitted by a transport-neutral module.
MediaType
Validated media type without a dependency on a serializer or schema format.
Method
The Request Method (VERB)
OperationDocumentation
Human-facing operation documentation independent from OpenAPI structures.
RateLimitPolicy
Declarative rate limit translated by an HTTP or rate-limiter adapter.
Redirect
Validated redirect response effect.
RequestContract
Logical validation/schema contract attached to part of a request.
ResponseCachePolicy
Declarative HTTP response caching policy, distinct from application data caching.
ResponseContract
Logical response schema contract attached to a status code.
ResponseCookie
Transport-neutral cookie mutation returned by HTTP modules.
RoutePath
A validated route path using {parameter} placeholders.
SecurityHeadersPolicy
Security response-header policy translated by framework adapters.
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).
TelemetryPolicy
Endpoint-level telemetry instructions consumed by tracing and metrics adapters.
Uri
The URI component of a request.

Enums§

AllowedOrigins
Allowed CORS origins.
AuthorizationPolicy
Declarative authentication and authorization requirement.
CacheVisibility
HTTP response cache visibility.
CsrfPolicy
Whether cross-site request-forgery protection is required.
FrameOptions
Browser frame embedding policy.
RateLimitScope
Identity dimension used to derive a rate-limit key.
ReferrerPolicy
Referrer information sent by compatible clients.
RequestContractLocation
Location from which an HTTP adapter validates or documents request data.
SameSite
Browser SameSite cookie behavior.

Traits§

HttpErrorMapper
Maps application errors into safe HTTP responses.
HttpRequestView
Read-only request view implemented by framework adapters or HttpRequestParts.

Functions§

default_error_code
Stable machine-readable code for a soaprs error category.
default_error_response
Builds the default safe error response.
default_error_status
Returns the default HTTP status for a stable soaprs error category.