pub struct Features {
pub variables: Option<AHashMap<String, String>>,
pub original_uri: Option<Uri>,
pub plugin_processing_times: Option<Vec<(Arc<str>, u32)>>,
pub compression_stat: Option<CompressionStat>,
pub modify_body_handlers: Option<AHashMap<String, Box<dyn ModifyResponseBody>>>,
pub plugin_notes: Option<Vec<(String, &'static str)>>,
pub plugin_values: Option<Vec<(String, Box<dyn Any + Send + Sync>)>>,
pub request_body_handlers: Option<Vec<Box<dyn HandleRequestBody>>>,
pub body_pace: Option<BodyPace>,
pub plain_response_body: Option<PlainBody>,
}Expand description
Optional features like tracing, plugins, and response modifications.
Fields§
§variables: Option<AHashMap<String, String>>A map of custom variables for request processing.
original_uri: Option<Uri>The uri the client asked for, when the location has rewritten it.
A plugin that sends the client somewhere relative to where it is
(the directory plugin, adding the closing slash) goes by this:
the rewritten path is the upstream’s, not the browser’s.
plugin_processing_times: Option<Vec<(Arc<str>, u32)>>A list of plugin names and their processing times in milliseconds.
compression_stat: Option<CompressionStat>Statistics about response compression.
modify_body_handlers: Option<AHashMap<String, Box<dyn ModifyResponseBody>>>A map of plugin names and their response body handlers.
plugin_notes: Option<Vec<(String, &'static str)>>What a plugin settled at one step of a request and goes by again
at a later one, under a name of its own: see
Ctx::set_plugin_note.
plugin_values: Option<Vec<(String, Box<dyn Any + Send + Sync>)>>What a plugin keeps for a later step of a request that a note
cannot say, under a name of its own: see Ctx::set_plugin_value.
request_body_handlers: Option<Vec<Box<dyn HandleRequestBody>>>What plugins do with the body of the request as it passes, see
HandleRequestBody.
body_pace: Option<BodyPace>How fast the body of the response is sent, where a plugin limits
that (bandwidth_limit): gone by wherever a body is written, for
a response from the upstream or the cache as for a file a plugin
sends itself.
plain_response_body: Option<PlainBody>A plugin reads the body of the answer to this request on its way
to the client and has to have it as the upstream sends it: see
Ctx::keep_response_body_plain.