api: Add non_exhaustive attribute to request and reponse types through the macro

This commit is contained in:
Jonas Platte 2020-09-11 21:01:02 +02:00
parent bb9b2b4a06
commit 67d113ba57
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
157 changed files with 2 additions and 310 deletions

View File

@ -522,6 +522,7 @@ impl ToTokens for Request {
let request = quote! { let request = quote! {
#[derive(Debug, Clone, #import_path::Outgoing)] #[derive(Debug, Clone, #import_path::Outgoing)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[incoming_derive(!Deserialize)] #[incoming_derive(!Deserialize)]
#( #struct_attributes )* #( #struct_attributes )*
pub struct Request #request_generics #request_def pub struct Request #request_generics #request_def

View File

@ -319,6 +319,7 @@ impl ToTokens for Response {
let response = quote! { let response = quote! {
#[derive(Debug, Clone, #import_path::Outgoing)] #[derive(Debug, Clone, #import_path::Outgoing)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[incoming_derive(!Deserialize)] #[incoming_derive(!Deserialize)]
#( #struct_attributes )* #( #struct_attributes )*
pub struct Response #response_def pub struct Response #response_def

View File

@ -14,7 +14,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The transaction ID for this set of events. /// The transaction ID for this set of events.
/// ///
@ -28,7 +27,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
} }

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room alias being queried. /// The room alias being queried.
#[ruma_api(path)] #[ruma_api(path)]
@ -21,7 +20,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
} }

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The user ID being queried. /// The user ID being queried.
#[ruma_api(path)] #[ruma_api(path)]
@ -21,7 +20,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
} }

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The protocol used to communicate to the third party network. /// The protocol used to communicate to the third party network.
#[ruma_api(path)] #[ruma_api(path)]
@ -27,7 +26,6 @@ ruma_api! {
pub fields: BTreeMap<String, String>, pub fields: BTreeMap<String, String>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// List of matched third party locations. /// List of matched third party locations.
#[ruma_api(body)] #[ruma_api(body)]

View File

@ -14,14 +14,12 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The Matrix room alias to look up. /// The Matrix room alias to look up.
#[ruma_api(query)] #[ruma_api(query)]
pub alias: &'a RoomAliasId, pub alias: &'a RoomAliasId,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// List of matched third party locations. /// List of matched third party locations.
#[ruma_api(body)] #[ruma_api(body)]

View File

@ -13,14 +13,12 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The name of the protocol. /// The name of the protocol.
#[ruma_api(path)] #[ruma_api(path)]
pub protocol: &'a str, pub protocol: &'a str,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// Metadata about the protocol. /// Metadata about the protocol.
#[ruma_api(body)] #[ruma_api(body)]

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The protocol used to communicate to the third party network. /// The protocol used to communicate to the third party network.
#[ruma_api(path)] #[ruma_api(path)]
@ -27,7 +26,6 @@ ruma_api! {
pub fields: BTreeMap<String, String>, pub fields: BTreeMap<String, String>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// List of matched third party users. /// List of matched third party users.
#[ruma_api(body)] #[ruma_api(body)]

View File

@ -14,14 +14,12 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The Matrix User ID to look up. /// The Matrix User ID to look up.
#[ruma_api(query)] #[ruma_api(query)]
pub userid: &'a UserId, pub userid: &'a UserId,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// List of matched third party users. /// List of matched third party users.
#[ruma_api(body)] #[ruma_api(body)]

View File

@ -14,7 +14,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Additional information for the User-Interactive Authentication API. /// Additional information for the User-Interactive Authentication API.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@ -28,7 +27,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: UiaaResponse error: UiaaResponse

View File

@ -14,7 +14,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Client-generated secret string used to protect this session. /// Client-generated secret string used to protect this session.
pub client_secret: &'a str, pub client_secret: &'a str,
@ -29,7 +28,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -14,7 +14,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The new password for the account. /// The new password for the account.
pub new_password: &'a str, pub new_password: &'a str,
@ -35,7 +34,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: UiaaResponse error: UiaaResponse

View File

@ -17,7 +17,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Additional authentication information for the user-interactive authentication API. /// Additional authentication information for the user-interactive authentication API.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@ -29,7 +28,6 @@ ruma_api! {
pub id_server: Option<&'a str>, pub id_server: Option<&'a str>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// Result of unbind operation. /// Result of unbind operation.
pub id_server_unbind_result: ThirdPartyIdRemovalStatus, pub id_server_unbind_result: ThirdPartyIdRemovalStatus,

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Identity server to delete from. /// Identity server to delete from.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@ -28,7 +27,6 @@ ruma_api! {
pub address: &'a str, pub address: &'a str,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// Result of unbind operation. /// Result of unbind operation.
pub id_server_unbind_result: ThirdPartyIdRemovalStatus, pub id_server_unbind_result: ThirdPartyIdRemovalStatus,

View File

@ -12,14 +12,12 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The username to check the availability of. /// The username to check the availability of.
#[ruma_api(query)] #[ruma_api(query)]
pub username: &'a str, pub username: &'a str,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// A flag to indicate that the username is available. /// A flag to indicate that the username is available.
/// This should always be true when the server replies with 200 OK. /// This should always be true when the server replies with 200 OK.

View File

@ -17,7 +17,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The desired password for the account. /// The desired password for the account.
/// ///
@ -67,7 +66,6 @@ ruma_api! {
pub inhibit_login: bool, pub inhibit_login: bool,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// An access token for the account. /// An access token for the account.
/// ///

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Client-generated secret string used to protect this session. /// Client-generated secret string used to protect this session.
pub client_secret: &'a str, pub client_secret: &'a str,
@ -36,7 +35,6 @@ ruma_api! {
pub identity_server_info: Option<IdentityServerInfo<'a>>, pub identity_server_info: Option<IdentityServerInfo<'a>>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The session identifier given by the identity server. /// The session identifier given by the identity server.
pub sid: String, pub sid: String,

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Client-generated secret string used to protect this session. /// Client-generated secret string used to protect this session.
pub client_secret: &'a str, pub client_secret: &'a str,
@ -39,7 +38,6 @@ ruma_api! {
pub identity_server_info: Option<IdentityServerInfo<'a>>, pub identity_server_info: Option<IdentityServerInfo<'a>>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The session identifier given by the identity server. /// The session identifier given by the identity server.
pub sid: String, pub sid: String,

View File

@ -16,14 +16,12 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// User ID of authenticated user. /// User ID of authenticated user.
#[ruma_api(path)] #[ruma_api(path)]
pub user_id: &'a UserId, pub user_id: &'a UserId,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// Access token for verifying user's identity. /// Access token for verifying user's identity.
pub access_token: String, pub access_token: String,

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Client-generated secret string used to protect this session. /// Client-generated secret string used to protect this session.
pub client_secret: &'a str, pub client_secret: &'a str,
@ -36,7 +35,6 @@ ruma_api! {
pub identity_server_info: Option<IdentityServerInfo<'a>>, pub identity_server_info: Option<IdentityServerInfo<'a>>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The session identifier given by the identity server. /// The session identifier given by the identity server.
pub sid: String, pub sid: String,

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Client-generated secret string used to protect this session. /// Client-generated secret string used to protect this session.
pub client_secret: &'a str, pub client_secret: &'a str,
@ -32,7 +31,6 @@ ruma_api! {
pub next_link: Option<&'a str>, pub next_link: Option<&'a str>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The session identifier given by the identity server. /// The session identifier given by the identity server.
pub sid: String, pub sid: String,

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Client-generated secret string used to protect this session. /// Client-generated secret string used to protect this session.
pub client_secret: &'a str, pub client_secret: &'a str,
@ -36,7 +35,6 @@ ruma_api! {
pub identity_server_info: Option<IdentityServerInfo<'a>>, pub identity_server_info: Option<IdentityServerInfo<'a>>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The session identifier given by the identity server. /// The session identifier given by the identity server.
pub sid: String, pub sid: String,

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Client-generated secret string used to protect this session. /// Client-generated secret string used to protect this session.
pub client_secret: &'a str, pub client_secret: &'a str,
@ -39,7 +38,6 @@ ruma_api! {
pub identity_server_info: Option<IdentityServerInfo<'a>>, pub identity_server_info: Option<IdentityServerInfo<'a>>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The session identifier given by the identity server. /// The session identifier given by the identity server.
pub sid: String, pub sid: String,

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Identity server to unbind from. /// Identity server to unbind from.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@ -28,7 +27,6 @@ ruma_api! {
pub address: &'a str, pub address: &'a str,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// Result of unbind operation. /// Result of unbind operation.
pub id_server_unbind_result: ThirdPartyIdRemovalStatus, pub id_server_unbind_result: ThirdPartyIdRemovalStatus,

View File

@ -14,10 +14,8 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: {} request: {}
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The id of the user that owns the access token. /// The id of the user that owns the access token.
pub user_id: UserId, pub user_id: UserId,

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room alias to set. /// The room alias to set.
#[ruma_api(path)] #[ruma_api(path)]
@ -24,7 +23,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room alias to remove. /// The room alias to remove.
#[ruma_api(path)] #[ruma_api(path)]
@ -21,7 +20,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -13,14 +13,12 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room alias. /// The room alias.
#[ruma_api(path)] #[ruma_api(path)]
pub room_alias: &'a RoomAliasId, pub room_alias: &'a RoomAliasId,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The room ID for this room alias. /// The room ID for this room alias.
pub room_id: RoomId, pub room_id: RoomId,

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The protocol (network) ID to update the room list for. /// The protocol (network) ID to update the room list for.
#[ruma_api(path)] #[ruma_api(path)]
@ -30,7 +29,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The backup version. Must be the current backup. /// The backup version. Must be the current backup.
#[ruma_api(query)] #[ruma_api(query)]
@ -27,7 +26,6 @@ ruma_api! {
pub rooms: Rooms, pub rooms: Rooms,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// An opaque string representing stored keys in the backup. Clients can compare it with /// An opaque string representing stored keys in the backup. Clients can compare it with
/// the etag value they received in the request of their last key storage request. /// the etag value they received in the request of their last key storage request.

View File

@ -14,14 +14,12 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The algorithm used for storing backups. /// The algorithm used for storing backups.
#[serde(flatten)] #[serde(flatten)]
pub algorithm: BackupAlgorithm, pub algorithm: BackupAlgorithm,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The backup version. This is an opaque string. /// The backup version. This is an opaque string.
pub version: String, pub version: String,

View File

@ -15,14 +15,12 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The backup version. /// The backup version.
#[ruma_api(path)] #[ruma_api(path)]
pub version: &'a str, pub version: &'a str,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The algorithm used for storing backups. /// The algorithm used for storing backups.
#[serde(flatten)] #[serde(flatten)]

View File

@ -14,14 +14,12 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The backup version. Must be the current backup. /// The backup version. Must be the current backup.
#[ruma_api(query)] #[ruma_api(query)]
pub version: &'a str, pub version: &'a str,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// A map from room IDs to session IDs to key data. /// A map from room IDs to session IDs to key data.
/// ///

View File

@ -16,10 +16,8 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: {} request: {}
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The algorithm used for storing backups. /// The algorithm used for storing backups.
#[serde(flatten)] #[serde(flatten)]

View File

@ -14,7 +14,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The backup version. /// The backup version.
#[ruma_api(path)] #[ruma_api(path)]
@ -26,7 +25,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -17,10 +17,8 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: {} request: {}
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The capabilities the server supports /// The capabilities the server supports
pub capabilities: Capabilities, pub capabilities: Capabilities,

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// User ID of user for whom to retrieve data. /// User ID of user for whom to retrieve data.
#[ruma_api(path)] #[ruma_api(path)]
@ -26,7 +25,6 @@ ruma_api! {
pub event_type: &'a str, pub event_type: &'a str,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// Account data content for the given type. /// Account data content for the given type.
#[ruma_api(body)] #[ruma_api(body)]

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// User ID of user for whom to retrieve data. /// User ID of user for whom to retrieve data.
#[ruma_api(path)] #[ruma_api(path)]
@ -30,7 +29,6 @@ ruma_api! {
pub event_type: &'a str, pub event_type: &'a str,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// Account data content for the given type. /// Account data content for the given type.
#[ruma_api(body)] #[ruma_api(body)]

View File

@ -14,7 +14,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Arbitrary JSON to store as config data. /// Arbitrary JSON to store as config data.
/// ///
@ -36,7 +35,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -14,7 +14,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Arbitrary JSON to store as config data. /// Arbitrary JSON to store as config data.
/// ///
@ -40,7 +39,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -17,10 +17,8 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: {} request: {}
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// A list of third party identifiers the homeserver has associated with the user's /// A list of third party identifiers the homeserver has associated with the user's
/// account. /// account.

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Client-generated secret string used to protect this session. /// Client-generated secret string used to protect this session.
pub client_secret: &'a str, pub client_secret: &'a str,
@ -43,7 +42,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -18,7 +18,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room to get events from. /// The room to get events from.
#[ruma_api(path)] #[ruma_api(path)]
@ -46,7 +45,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// A token that can be used to paginate backwards with. /// A token that can be used to paginate backwards with.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The device to delete. /// The device to delete.
#[ruma_api(path)] #[ruma_api(path)]
@ -27,7 +26,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: UiaaResponse error: UiaaResponse

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// List of devices to delete. /// List of devices to delete.
pub devices: &'a [DeviceIdBox], pub devices: &'a [DeviceIdBox],
@ -26,7 +25,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: UiaaResponse error: UiaaResponse

View File

@ -14,14 +14,12 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The device to retrieve. /// The device to retrieve.
#[ruma_api(path)] #[ruma_api(path)]
pub device_id: &'a DeviceId, pub device_id: &'a DeviceId,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// Information about the device. /// Information about the device.
#[ruma_api(body)] #[ruma_api(body)]

View File

@ -14,10 +14,8 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: {} request: {}
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// A list of all registered devices for this user /// A list of all registered devices for this user
pub devices: Vec<Device>, pub devices: Vec<Device>,

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The device to update. /// The device to update.
#[ruma_api(path)] #[ruma_api(path)]
@ -26,7 +25,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -15,7 +15,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Limit for the number of results to return. /// Limit for the number of results to return.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@ -35,7 +34,6 @@ ruma_api! {
pub server: Option<&'a str>, pub server: Option<&'a str>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// A paginated chunk of public rooms. /// A paginated chunk of public rooms.
pub chunk: Vec<PublicRoomsChunk>, pub chunk: Vec<PublicRoomsChunk>,

View File

@ -17,7 +17,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The server to fetch the public room lists from. /// The server to fetch the public room lists from.
/// ///
@ -44,7 +43,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// A paginated chunk of public rooms. /// A paginated chunk of public rooms.
pub chunk: Vec<PublicRoomsChunk>, pub chunk: Vec<PublicRoomsChunk>,

View File

@ -15,14 +15,12 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The ID of the room of which to request the visibility. /// The ID of the room of which to request the visibility.
#[ruma_api(path)] #[ruma_api(path)]
pub room_id: &'a RoomId, pub room_id: &'a RoomId,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// Visibility of the room. /// Visibility of the room.
pub visibility: Visibility, pub visibility: Visibility,

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The ID of the room of which to set the visibility. /// The ID of the room of which to set the visibility.
#[ruma_api(path)] #[ruma_api(path)]
@ -26,7 +25,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The ID of the user uploading the filter. /// The ID of the user uploading the filter.
/// ///
@ -28,7 +27,6 @@ ruma_api! {
pub filter: FilterDefinition<'a>, pub filter: FilterDefinition<'a>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The ID of the filter that was created. /// The ID of the filter that was created.
pub filter_id: String, pub filter_id: String,

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The user ID to download a filter for. /// The user ID to download a filter for.
#[ruma_api(path)] #[ruma_api(path)]
@ -26,7 +25,6 @@ ruma_api! {
pub filter_id: &'a str, pub filter_id: &'a str,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The filter definition. /// The filter definition.
#[ruma_api(body)] #[ruma_api(body)]

View File

@ -20,7 +20,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The time (in milliseconds) to wait when downloading keys from remote servers. /// The time (in milliseconds) to wait when downloading keys from remote servers.
/// 10 seconds is the recommended default. /// 10 seconds is the recommended default.
@ -35,7 +34,6 @@ ruma_api! {
pub one_time_keys: BTreeMap<UserId, BTreeMap<DeviceIdBox, DeviceKeyAlgorithm>>, pub one_time_keys: BTreeMap<UserId, BTreeMap<DeviceIdBox, DeviceKeyAlgorithm>>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// If any remote homeservers could not be reached, they are recorded here. /// If any remote homeservers could not be reached, they are recorded here.
/// The names of the properties are the names of the unreachable servers. /// The names of the properties are the names of the unreachable servers.

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The desired start point of the list. /// The desired start point of the list.
/// ///
@ -29,7 +28,6 @@ ruma_api! {
pub to: &'a str, pub to: &'a str,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The Matrix User IDs of all users who updated their device identity keys. /// The Matrix User IDs of all users who updated their device identity keys.
pub changed: Vec<UserId>, pub changed: Vec<UserId>,

View File

@ -21,7 +21,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The time (in milliseconds) to wait when downloading keys from remote /// The time (in milliseconds) to wait when downloading keys from remote
/// servers. 10 seconds is the recommended default. /// servers. 10 seconds is the recommended default.
@ -46,7 +45,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// If any remote homeservers could not be reached, they are recorded /// If any remote homeservers could not be reached, they are recorded
/// here. The names of the properties are the names of the unreachable /// here. The names of the properties are the names of the unreachable

View File

@ -20,7 +20,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Identity keys for the device. May be absent if no new identity keys are required. /// Identity keys for the device. May be absent if no new identity keys are required.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@ -31,7 +30,6 @@ ruma_api! {
pub one_time_keys: Option<BTreeMap<DeviceKeyId, OneTimeKey>>, pub one_time_keys: Option<BTreeMap<DeviceKeyId, OneTimeKey>>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// For each key algorithm, the number of unclaimed one-time keys of that /// For each key algorithm, the number of unclaimed one-time keys of that
/// type currently held on the server for this device. /// type currently held on the server for this device.

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Signed keys. /// Signed keys.
#[ruma_api(body)] #[ruma_api(body)]
@ -23,7 +22,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -16,7 +16,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Additional authentication information for the user-interactive authentication API. /// Additional authentication information for the user-interactive authentication API.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@ -38,7 +37,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -12,7 +12,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The name of the file being uploaded. /// The name of the file being uploaded.
#[ruma_api(query)] #[ruma_api(query)]
@ -29,7 +28,6 @@ ruma_api! {
pub file: Vec<u8>, pub file: Vec<u8>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The MXC URI for the uploaded content. /// The MXC URI for the uploaded content.
pub content_uri: String, pub content_uri: String,

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The media ID from the mxc:// URI (the path component). /// The media ID from the mxc:// URI (the path component).
#[ruma_api(path)] #[ruma_api(path)]
@ -31,7 +30,6 @@ ruma_api! {
pub allow_remote: bool, pub allow_remote: bool,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The content that was previously uploaded. /// The content that was previously uploaded.
#[ruma_api(raw_body)] #[ruma_api(raw_body)]

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The media ID from the mxc:// URI (the path component). /// The media ID from the mxc:// URI (the path component).
#[ruma_api(path)] #[ruma_api(path)]
@ -35,7 +34,6 @@ ruma_api! {
pub allow_remote: bool, pub allow_remote: bool,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The content that was previously uploaded. /// The content that was previously uploaded.
#[ruma_api(raw_body)] #[ruma_api(raw_body)]

View File

@ -26,7 +26,6 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The media ID from the mxc:// URI (the path component). /// The media ID from the mxc:// URI (the path component).
#[ruma_api(path)] #[ruma_api(path)]
@ -59,7 +58,6 @@ ruma_api! {
pub allow_remote: bool, pub allow_remote: bool,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The content type of the thumbnail. /// The content type of the thumbnail.
#[ruma_api(header = CONTENT_TYPE)] #[ruma_api(header = CONTENT_TYPE)]

View File

@ -14,10 +14,8 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: {} request: {}
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// Maximum size of upload in bytes. /// Maximum size of upload in bytes.
#[serde(rename = "m.upload.size")] #[serde(rename = "m.upload.size")]

View File

@ -16,7 +16,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// URL to get a preview of. /// URL to get a preview of.
#[ruma_api(query)] #[ruma_api(query)]
@ -29,7 +28,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// OpenGraph-like data for the URL. /// OpenGraph-like data for the URL.
/// ///

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room to kick the user from. /// The room to kick the user from.
#[ruma_api(path)] #[ruma_api(path)]
@ -28,7 +27,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room to forget. /// The room to forget.
#[ruma_api(path)] #[ruma_api(path)]
@ -21,7 +20,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -16,7 +16,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room to get the member events for. /// The room to get the member events for.
#[ruma_api(path)] #[ruma_api(path)]
@ -42,7 +41,6 @@ ruma_api! {
pub not_membership: Option<MembershipEventFilter>, pub not_membership: Option<MembershipEventFilter>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// A list of member events. /// A list of member events.
pub chunk: Vec<Raw<MemberEvent>> pub chunk: Vec<Raw<MemberEvent>>

View File

@ -23,7 +23,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room where the user should be invited. /// The room where the user should be invited.
#[ruma_api(path)] #[ruma_api(path)]
@ -35,7 +34,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

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

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room where the user should be invited. /// The room where the user should be invited.
#[ruma_api(path)] #[ruma_api(path)]
@ -33,7 +32,6 @@ ruma_api! {
pub third_party_signed: Option<ThirdPartySigned<'a>>, pub third_party_signed: Option<ThirdPartySigned<'a>>,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The room that the user joined. /// The room that the user joined.
pub room_id: RoomId, pub room_id: RoomId,

View File

@ -16,14 +16,12 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room to get the members of. /// The room to get the members of.
#[ruma_api(path)] #[ruma_api(path)]
pub room_id: &'a RoomId, pub room_id: &'a RoomId,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// A list of the rooms the user is in, i.e. /// A list of the rooms the user is in, i.e.
/// the ID of each room in which the user has joined membership. /// the ID of each room in which the user has joined membership.

View File

@ -14,10 +14,8 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: {} request: {}
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// A list of the rooms the user is in, i.e. the ID of each room in /// A list of the rooms the user is in, i.e. the ID of each room in
/// which the user has joined membership. /// which the user has joined membership.

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room to kick the user from. /// The room to kick the user from.
#[ruma_api(path)] #[ruma_api(path)]
@ -28,7 +27,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room to leave. /// The room to leave.
#[ruma_api(path)] #[ruma_api(path)]
@ -21,7 +20,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room to unban the user from. /// The room to unban the user from.
#[ruma_api(path)] #[ruma_api(path)]
@ -24,7 +23,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -19,7 +19,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room to get events from. /// The room to get events from.
#[ruma_api(path)] #[ruma_api(path)]
@ -64,7 +63,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The token the pagination starts from. /// The token the pagination starts from.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]

View File

@ -16,14 +16,12 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The user whose presence state will be retrieved. /// The user whose presence state will be retrieved.
#[ruma_api(path)] #[ruma_api(path)]
pub user_id: &'a UserId, pub user_id: &'a UserId,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The state message for this user if one was set. /// The state message for this user if one was set.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]

View File

@ -14,7 +14,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The user whose presence state will be updated. /// The user whose presence state will be updated.
#[ruma_api(path)] #[ruma_api(path)]
@ -29,7 +28,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The user whose avatar URL will be retrieved. /// The user whose avatar URL will be retrieved.
#[ruma_api(path)] #[ruma_api(path)]
@ -21,7 +20,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The user's avatar URL, if set. /// The user's avatar URL, if set.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The user whose display name will be retrieved. /// The user whose display name will be retrieved.
#[ruma_api(path)] #[ruma_api(path)]
@ -21,7 +20,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The user's display name, if set. /// The user's display name, if set.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: false, requires_authentication: false,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The user whose profile will be retrieved. /// The user whose profile will be retrieved.
#[ruma_api(path)] #[ruma_api(path)]
@ -21,7 +20,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The user's avatar URL, if set. /// The user's avatar URL, if set.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The user whose avatar URL will be set. /// The user whose avatar URL will be set.
#[ruma_api(path)] #[ruma_api(path)]
@ -26,7 +25,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The user whose display name will be set. /// The user whose display name will be set.
#[ruma_api(path)] #[ruma_api(path)]
@ -25,7 +24,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -14,7 +14,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The scope to delete from. 'global' to specify global rules. /// The scope to delete from. 'global' to specify global rules.
#[ruma_api(path)] #[ruma_api(path)]
@ -30,7 +29,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -20,7 +20,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// Pagination token given to retrieve the next set of events. /// Pagination token given to retrieve the next set of events.
#[ruma_api(query)] #[ruma_api(query)]
@ -39,7 +38,6 @@ ruma_api! {
pub only: Option<&'a str> pub only: Option<&'a str>
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The token to supply in the from param of the next /notifications request in order /// The token to supply in the from param of the next /notifications request in order
/// to request more events. If this is absent, there are no more results. /// to request more events. If this is absent, there are no more results.

View File

@ -15,10 +15,8 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: {} request: {}
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// An array containing the current pushers for the user. /// An array containing the current pushers for the user.
pub pushers: Vec<Pusher> pub pushers: Vec<Pusher>

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The scope to fetch rules from. 'global' to specify global rules. /// The scope to fetch rules from. 'global' to specify global rules.
#[ruma_api(path)] #[ruma_api(path)]
@ -30,7 +29,6 @@ ruma_api! {
pub rule_id: &'a str, pub rule_id: &'a str,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The specific push rule. /// The specific push rule.
#[ruma_api(body)] #[ruma_api(body)]

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The scope to fetch a rule from. 'global' to specify global rules. /// The scope to fetch a rule from. 'global' to specify global rules.
#[ruma_api(path)] #[ruma_api(path)]
@ -30,7 +29,6 @@ ruma_api! {
pub rule_id: &'a str, pub rule_id: &'a str,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The actions to perform for this rule. /// The actions to perform for this rule.
pub actions: Vec<Action> pub actions: Vec<Action>

View File

@ -14,7 +14,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The scope to fetch a rule from. 'global' to specify global rules. /// The scope to fetch a rule from. 'global' to specify global rules.
#[ruma_api(path)] #[ruma_api(path)]
@ -29,7 +28,6 @@ ruma_api! {
pub rule_id: &'a str, pub rule_id: &'a str,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// Whether the push rule is enabled or not. /// Whether the push rule is enabled or not.
pub enabled: bool, pub enabled: bool,

View File

@ -14,10 +14,8 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: {} request: {}
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The global ruleset. /// The global ruleset.
pub global: Ruleset, pub global: Ruleset,

View File

@ -14,10 +14,8 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: {} request: {}
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: { response: {
/// The global ruleset. /// The global ruleset.
#[ruma_api(body)] #[ruma_api(body)]

View File

@ -14,7 +14,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The pusher to configure. /// The pusher to configure.
#[serde(flatten)] #[serde(flatten)]
@ -28,7 +27,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The scope to set the rule in. 'global' to specify global rules. /// The scope to set the rule in. 'global' to specify global rules.
#[ruma_api(path)] #[ruma_api(path)]
@ -54,7 +53,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The scope to fetch a rule from. 'global' to specify global rules. /// The scope to fetch a rule from. 'global' to specify global rules.
#[ruma_api(path)] #[ruma_api(path)]
@ -34,7 +33,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -14,7 +14,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The scope to fetch a rule from. 'global' to specify global rules. /// The scope to fetch a rule from. 'global' to specify global rules.
#[ruma_api(path)] #[ruma_api(path)]
@ -33,7 +32,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -13,7 +13,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room ID to set the read marker in for the user. /// The room ID to set the read marker in for the user.
#[ruma_api(path)] #[ruma_api(path)]
@ -33,7 +32,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

View File

@ -16,7 +16,6 @@ ruma_api! {
requires_authentication: true, requires_authentication: true,
} }
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: { request: {
/// The room in which to send the event. /// The room in which to send the event.
#[ruma_api(path)] #[ruma_api(path)]
@ -32,7 +31,6 @@ ruma_api! {
} }
#[derive(Default)] #[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {} response: {}
error: crate::Error error: crate::Error

Some files were not shown because too many files have changed in this diff Show More