pub trait UpdateRequest: Serialize + Debug {
type Response: TryInto<Self::Output, Error = Error> + DeserializeOwned;
type Output;
// Required method
fn endpoint(&self) -> Cow<'static, str>;
// Provided methods
fn content_type() -> &'static str { ... }
fn body(&self) -> Result<Vec<u8>> { ... }
fn method(&self) -> Method { ... }
}Expand description
A request that does an update, by default the body is serialized as
application/x-www-form-urlencoded and the method is POST
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn content_type() -> &'static str
fn content_type() -> &'static str
the content type of the post request, by default application/x-www-form-urlencoded
Sourcefn body(&self) -> Result<Vec<u8>>
fn body(&self) -> Result<Vec<u8>>
The body as bytes, by default the type implementing this trait is serialized using serde_qs.
fn method(&self) -> Method
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.