Make Request and Response cloneable

This commit is contained in:
Jonas Herzig 2018-09-08 11:10:40 +02:00
parent adf785ffc9
commit 20cbadd95b
3 changed files with 3 additions and 3 deletions

View File

@ -176,7 +176,7 @@ impl ToTokens for Request {
fn to_tokens(&self, tokens: &mut Tokens) {
let request_struct_header = quote! {
/// Data for a request to this API endpoint.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct Request
};

View File

@ -159,7 +159,7 @@ impl ToTokens for Response {
fn to_tokens(&self, tokens: &mut Tokens) {
let response_struct_header = quote! {
/// Data in the response from this API endpoint.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct Response
};

View File

@ -172,7 +172,7 @@ mod api;
/// pub mod newtype_body_endpoint {
/// use ruma_api_macros::ruma_api;
///
/// #[derive(Debug, Deserialize)]
/// #[derive(Clone, Debug, Deserialize)]
/// pub struct MyCustomType {
/// pub foo: String,
/// }