ruma_client_api/rendezvous/
delete_rendezvous_session.rs

1//! `DELETE /_matrix/client/*/rendezvous/{id}`
2//!
3//! Delete/close a rendezvous session.
4
5pub mod unstable {
6    //! `unstable/io.element.msc4388` ([MSC])
7    //!
8    //! [MSC]: https://github.com/matrix-org/matrix-spec-proposals/pull/4388
9
10    use ruma_common::{
11        api::{auth_scheme::NoAuthentication, request, response},
12        metadata,
13    };
14
15    metadata! {
16        method: DELETE,
17        rate_limited: true,
18        authentication: NoAuthentication,
19        history: {
20            unstable("io.element.msc4388") => "/_matrix/client/unstable/io.element.msc4388/rendezvous/{id}",
21        }
22    }
23
24    /// Request type for the `DELETE` `rendezvous` endpoint.
25    #[request(error = crate::Error)]
26    pub struct Request {
27        /// The ID of the rendezvous session to delete.
28        #[ruma_api(path)]
29        pub id: String,
30    }
31
32    impl Request {
33        /// Creates a new `Request` with the given id.
34        pub fn new(id: String) -> Self {
35            Self { id }
36        }
37    }
38
39    /// Response type for the `DELETE` `rendezvous` endpoint.
40    #[response(error = crate::Error)]
41    #[derive(Default)]
42    pub struct Response {}
43
44    impl Response {
45        /// Creates a new `Response`.
46        pub fn new() -> Self {
47            Self {}
48        }
49    }
50}