api: Make Clone a supertrait of OutgoingRequest
Allow to retry a request.
This commit is contained in:
parent
04a32fe010
commit
8e2c4b5cb7
@ -26,6 +26,7 @@ Breaking changes:
|
||||
* Split `RoomId` matrix URI constructors between methods with and without routing
|
||||
* Allow to add routing servers to `RoomId::matrix_to_event_uri()`
|
||||
* Move `receipt::ReceiptType` to `events::receipt`
|
||||
* Make `Clone` as supertrait of `api::OutgoingRequest`
|
||||
|
||||
[spec]: https://github.com/matrix-org/matrix-spec-proposals/pull/3669
|
||||
|
||||
|
@ -240,7 +240,7 @@ impl<'a> SendAccessToken<'a> {
|
||||
}
|
||||
|
||||
/// A request type for a Matrix API endpoint, used for sending requests.
|
||||
pub trait OutgoingRequest: Sized {
|
||||
pub trait OutgoingRequest: Sized + Clone {
|
||||
/// A type capturing the expected error conditions the server can return.
|
||||
type EndpointError: EndpointError;
|
||||
|
||||
|
@ -17,7 +17,7 @@ use ruma_common::{
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// A request to create a new room alias.
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Request {
|
||||
pub room_id: OwnedRoomId, // body
|
||||
pub room_alias: OwnedRoomAliasId, // path
|
||||
|
Loading…
x
Reference in New Issue
Block a user