Skip to main content

EndpointBody

Trait EndpointBody 

Source
pub trait EndpointBody: Sized + Default {
    type ParamsNext: Default;
    type CallInitial: Default;

    // Required method
    fn apply_body(
        self,
        builder: RequestBuilder<'_>,
    ) -> Result<RequestBuilder<'_>, Error>;
}
Expand description

Applies a typed request body before send.

Required Associated Types§

Source

type ParamsNext: Default

Builder state after .params() when path params were required.

Source

type CallInitial: Default

Whether Client::call starts in NeedsBody (POST + required body).

Required Methods§

Source

fn apply_body( self, builder: RequestBuilder<'_>, ) -> Result<RequestBuilder<'_>, Error>

Applies this body to the builder.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl EndpointBody for ()

Implementors§