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! {
#[derive(Debug, Clone, #import_path::Outgoing)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[incoming_derive(!Deserialize)]
#( #struct_attributes )*
pub struct Request #request_generics #request_def

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -15,7 +15,6 @@ ruma_api! {
requires_authentication: true,
}
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: {
/// The backup version. Must be the current backup.
#[ruma_api(query)]
@ -27,7 +26,6 @@ ruma_api! {
pub rooms: Rooms,
}
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {
/// 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.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -20,7 +20,6 @@ ruma_api! {
}
#[derive(Default)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
request: {
/// Pagination token given to retrieve the next set of events.
#[ruma_api(query)]
@ -39,7 +38,6 @@ ruma_api! {
pub only: Option<&'a str>
}
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
response: {
/// 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.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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