pub trait TryIntoOutgoingRequest {
type Error;
// Required method
fn try_into_outgoing_request(
self,
) -> Result<(OutgoingRequest, Option<Vec<u8>>), Self::Error>;
}
Expand description
A trait for converting a type into an OutgoingRequest
Required Associated Types§
Required Methods§
Sourcefn try_into_outgoing_request(
self,
) -> Result<(OutgoingRequest, Option<Vec<u8>>), Self::Error>
fn try_into_outgoing_request( self, ) -> Result<(OutgoingRequest, Option<Vec<u8>>), Self::Error>
Turn the type into an OutgoingRequest
If the implementor can be sure that the OutgoingRequest::write
has not been called they
can return a buffer as the second element of the returned tuple and send
will send
that as the request body.