pub struct ConjureRuntime { /* private fields */ }
Expand description
A type providing server logic that is configured at runtime.
Implementations§
Source§impl ConjureRuntime
impl ConjureRuntime
Sourcepub fn request_body_encoding(
&self,
headers: &HeaderMap,
) -> Result<&(dyn Encoding + Sync + Send), Error>
pub fn request_body_encoding( &self, headers: &HeaderMap, ) -> Result<&(dyn Encoding + Sync + Send), Error>
Returns the appropriate Encoding
to deserialize the request body.
The implementation currently compares the request’s Content-Type
header against Encoding::content_type
,
ignoring parameters.
Sourcepub fn response_body_encoding(
&self,
headers: &HeaderMap,
) -> Result<&(dyn Encoding + Sync + Send), Error>
pub fn response_body_encoding( &self, headers: &HeaderMap, ) -> Result<&(dyn Encoding + Sync + Send), Error>
Returns the appropriate Encoding
to serialize the response body.
The MIME types in the request’s Accept
header are processed in accordance with RFC 9110. If two MIME types
have equal preference by that algorithm, the implementation will prefer the type declared earlier in the header.
MIME types are matched against Encoding::content_type
, ignoring parameters. If multiple Encoding
s are
matched against the same MIME type, the encoding registered first by Builder::encoding
will be selected.
The implementation treats the absence of the Accept
header equivalently to Accept: */*
.