Make some request and response types non-exhaustive

This commit is contained in:
Jonas Platte 2020-08-14 00:30:25 +02:00
parent 157957ced6
commit a165c43460
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
6 changed files with 11 additions and 0 deletions

View File

@ -15,6 +15,7 @@ ruma_api! {
requires_authentication: true,
}
#[non_exhaustive]
request: {
/// The room where the user should be invited.
#[ruma_api(path)]
@ -26,6 +27,7 @@ ruma_api! {
pub third_party_signed: Option<ThirdPartySigned<'a>>,
}
#[non_exhaustive]
response: {
/// The room that the user joined.
pub room_id: RoomId,

View File

@ -13,12 +13,14 @@ ruma_api! {
requires_authentication: true,
}
#[non_exhaustive]
request: {
/// The room to leave.
#[ruma_api(path)]
pub room_id: &'a RoomId,
}
#[non_exhaustive]
response: {}
error: crate::Error

View File

@ -19,6 +19,7 @@ ruma_api! {
requires_authentication: true,
}
#[non_exhaustive]
request: {
/// The room to get events from.
#[ruma_api(path)]

View File

@ -27,6 +27,7 @@ ruma_api! {
requires_authentication: true,
}
#[non_exhaustive]
request: {
/// Extra keys to be added to the content of the `m.room.create`.
#[serde(skip_serializing_if = "Option::is_none")]
@ -86,6 +87,7 @@ ruma_api! {
pub visibility: Option<Visibility>,
}
#[non_exhaustive]
response: {
/// The created room's ID.
pub room_id: RoomId,

View File

@ -13,8 +13,10 @@ ruma_api! {
requires_authentication: false,
}
#[non_exhaustive]
request: {}
#[non_exhaustive]
response: {
/// Information about the homeserver to connect to.
#[serde(rename = "m.homeserver")]

View File

@ -14,8 +14,10 @@ ruma_api! {
requires_authentication: false,
}
#[non_exhaustive]
request: {}
#[non_exhaustive]
response: {
/// A list of Matrix client API protocol versions supported by the homeserver.
pub versions: Vec<String>,