Skip to main content

Crate rama_http_types

Crate rama_http_types 

Source
Expand description

rama http types and minimal utilities

§Rama

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

Learn more about rama:

Re-exports§

pub use body::Body;
pub use body::BodyDataStream;
pub use body::BodyExtractExt;
pub use body::BodyLimit;
pub use body::InfiniteReader;
pub use body::StreamingBody;
pub use body::sse;

Modules§

body
Asynchronous HTTP request or response body.
conn
HTTP connection utilities.
fingerprint
HTTP fingerprint implementations (JA4H, Akamai HTTP/2).
header
Forked from the http crate — vendored so rama owns its HTTP header types. See docs/thirdparty/fork/README.md. The fork-style lint allows below also cover the name/value/map child modules.
method
Forked from the http crate — vendored so rama owns its HTTP leaf types. See docs/thirdparty/fork/README.md.
mime
Re-export of the mime crate.
opentelemetry
Opentelemetry utilities
proto
High level pertaining to the HTTP message protocol.
proxy
request
response
status
Forked from the http crate — vendored so rama owns its HTTP leaf types. See docs/thirdparty/fork/README.md.
stream
Stream-oriented utilities layered on top of the HTTP request type.
version
HTTP version type, owned by rama-net.

Structs§

BodyLimitLayer
Limit the size of the request and/or response bodies.
BodyLimitService
Communicate to the downstream http service to apply a limit to the body.
Error
A generic “error” for HTTP connections.
HeaderMap
A specialized multimap for header names and values.
HeaderName
Represents an HTTP header field name
HeaderValue
Represents an HTTP header field value.
IntoOrderedIter
A consuming iterator over HeaderMap entries in original insertion order.
Method
The Request Method (VERB)
OrderedIter
An iterator over HeaderMap entries in their original insertion order.
OriginalRouterUri
Extension type that can be inserted in case a Uri is modified as part of nested routers
Request
Represents an HTTP request.
Response
Represents an HTTP response
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).
Version
Represents a version of the HTTP spec.

Traits§

HttpRequestParts
HttpRequestParts is used in places where we don’t need the ReqBody of the HttpRequest
HttpRequestPartsMut
Same as HttpRequestParts but also adding mutable access

Functions§

protocol_from_uri_or_extensions
Resolve the application Protocol (scheme) of an HTTP request from its Uri and Extensions, without needing a full Request/Parts.

Type Aliases§

Result
A Result typedef to use with the Error type.