pub trait SerializeRequest:
Send
+ Sync
+ Debug {
// Required method
fn serialize_input(
&self,
input: Input,
cfg: &mut ConfigBag,
) -> Result<HttpRequest, BoxError>;
}
Expand description
Serialization implementation that converts an Input
into an HttpRequest
.
Required Methods§
Sourcefn serialize_input(
&self,
input: Input,
cfg: &mut ConfigBag,
) -> Result<HttpRequest, BoxError>
fn serialize_input( &self, input: Input, cfg: &mut ConfigBag, ) -> Result<HttpRequest, BoxError>
Serializes the input into an HTTP request.
The type of the Input
must be known ahead of time by the request serializer
implementation, and must be downcasted to get access to the information necessary
for serialization.
The request serializer is generally added to the ConfigBag
by the operation’s
code generated runtime plugin, which is aware of the correct input/output/error types.