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§

source

type Error

The error if the conversion fails

Required Methods§

source

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.

Implementations on Foreign Types§

source§

impl<B> TryIntoOutgoingRequest for Request<B>
where B: TryIntoBody, B::Error: Error + Send + Sync + 'static,

Implementors§