Skip to main content

PatchRequest

Trait PatchRequest 

Source
pub trait PatchRequest: Sized {
    type Request: Encodable;

    // Required methods
    fn path(&self) -> Cow<'_, str>;
    fn body(&self) -> Self::Request;

    // Provided method
    fn request(self) -> Patch<Self> { ... }
}
Expand description

PATCH Request method.

Required Associated Types§

Source

type Request: Encodable

Request body type.

Required Methods§

Source

fn path(&self) -> Cow<'_, str>

Get path of request.

Source

fn body(&self) -> Self::Request

Get body of request.

Provided Methods§

Source

fn request(self) -> Patch<Self>

Turn self into Request.

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<T: PatchRequest> PatchRequest for &T

Source§

type Request = <T as PatchRequest>::Request

Source§

fn path(&self) -> Cow<'_, str>

Source§

fn body(&self) -> Self::Request

Implementors§