Trait RequestPut

Source
pub trait RequestPut: Request {
    type Body: HelixRequestBody;

    // Required method
    fn parse_inner_response(
        request: Option<Self>,
        uri: &Uri,
        response: &str,
        status: StatusCode,
    ) -> Result<Response<Self, <Self as Request>::Response>, HelixRequestPutError>
       where Self: Sized;

    // Provided methods
    fn create_request(
        &self,
        body: Self::Body,
        token: &str,
        client_id: &str,
    ) -> Result<Request<Bytes>, CreateRequestError> { ... }
    fn parse_response<B: Into<Bytes>>(
        request: Option<Self>,
        uri: &Uri,
        response: Response<B>,
    ) -> Result<Response<Self, <Self as Request>::Response>, HelixRequestPutError>
       where Self: Sized { ... }
}
Available on crate feature helix only.
Expand description

Helix endpoint PUTs information

Required Associated Types§

Source

type Body: HelixRequestBody

Body parameters

Required Methods§

Source

fn parse_inner_response( request: Option<Self>, uri: &Uri, response: &str, status: StatusCode, ) -> Result<Response<Self, <Self as Request>::Response>, HelixRequestPutError>
where Self: Sized,

Parse a response string into the response.

Provided Methods§

Source

fn create_request( &self, body: Self::Body, token: &str, client_id: &str, ) -> Result<Request<Bytes>, CreateRequestError>

Create a http::Request from this Request in your client

Source

fn parse_response<B: Into<Bytes>>( request: Option<Self>, uri: &Uri, response: Response<B>, ) -> Result<Response<Self, <Self as Request>::Response>, HelixRequestPutError>
where Self: Sized,

Parse response.

§Notes

Pass in the request to enable pagination if supported.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§