Make Request and Response cloneable
This commit is contained in:
		
							parent
							
								
									adf785ffc9
								
							
						
					
					
						commit
						20cbadd95b
					
				| @ -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 | ||||
|         }; | ||||
| 
 | ||||
|  | ||||
| @ -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 | ||||
|         }; | ||||
| 
 | ||||
|  | ||||
| @ -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,
 | ||||
| ///     }
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user