ruma_federation_api/discovery/
discover_homeserver.rs1use ruma_common::{
8 OwnedServerName,
9 api::{auth_scheme::NoAuthentication, request, response},
10 metadata,
11};
12
13metadata! {
14 method: GET,
15 rate_limited: false,
16 authentication: NoAuthentication,
17 path: "/.well-known/matrix/server",
18}
19
20#[request]
22#[derive(Default)]
23pub struct Request {}
24
25#[response]
27pub struct Response {
28 #[serde(rename = "m.server")]
30 pub server: OwnedServerName,
31}
32
33impl Request {
34 pub fn new() -> Self {
36 Self {}
37 }
38}
39
40impl Response {
41 pub fn new(server: OwnedServerName) -> Self {
43 Self { server }
44 }
45}