Remove now-redundant doc(cfg) attributes

They are now implied:
https://github.com/rust-lang/rust/pull/89596
This commit is contained in:
Jonas Platte 2021-10-08 11:52:18 +02:00
parent 343bb2a67b
commit 271491732e
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
46 changed files with 0 additions and 101 deletions

View File

@ -13,7 +13,6 @@ pub mod directory;
pub mod filter; pub mod filter;
pub mod keys; pub mod keys;
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
pub mod knock; pub mod knock;
pub mod media; pub mod media;
pub mod membership; pub mod membership;

View File

@ -1,6 +1,5 @@
//! Endpoints for server-side key backups. //! Endpoints for server-side key backups.
#![cfg(feature = "unstable-pre-spec")] #![cfg(feature = "unstable-pre-spec")]
#![cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
pub mod add_backup_key_session; pub mod add_backup_key_session;
pub mod add_backup_key_sessions; pub mod add_backup_key_sessions;

View File

@ -58,7 +58,6 @@ pub struct PublicRoomsChunk {
/// The joining rule for the room. /// The joining rule for the room.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub join_rule: Option<JoinRule>, pub join_rule: Option<JoinRule>,
} }

View File

@ -6,8 +6,6 @@ pub mod get_keys;
pub mod upload_keys; pub mod upload_keys;
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
pub mod upload_signatures; pub mod upload_signatures;
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
pub mod upload_signing_keys; pub mod upload_signing_keys;

View File

@ -58,19 +58,16 @@ ruma_api! {
/// Information on the master cross-signing keys of the queried users. /// Information on the master cross-signing keys of the queried users.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub master_keys: BTreeMap<UserId, CrossSigningKey>, pub master_keys: BTreeMap<UserId, CrossSigningKey>,
/// Information on the self-signing keys of the queried users. /// Information on the self-signing keys of the queried users.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub self_signing_keys: BTreeMap<UserId, CrossSigningKey>, pub self_signing_keys: BTreeMap<UserId, CrossSigningKey>,
/// Information on the user-signing keys of the queried users. /// Information on the user-signing keys of the queried users.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub user_signing_keys: BTreeMap<UserId, CrossSigningKey>, pub user_signing_keys: BTreeMap<UserId, CrossSigningKey>,
} }

View File

@ -33,7 +33,6 @@ ruma_api! {
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
#[ruma_api(query)] #[ruma_api(query)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(default, skip_serializing_if = "ruma_serde::is_default", rename = "xyz.amorgan.blurhash")] #[serde(default, skip_serializing_if = "ruma_serde::is_default", rename = "xyz.amorgan.blurhash")]
pub generate_blurhash: bool, pub generate_blurhash: bool,
} }
@ -47,7 +46,6 @@ ruma_api! {
/// This uses the unstable prefix in /// This uses the unstable prefix in
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(rename = "xyz.amorgan.blurhash")] #[serde(rename = "xyz.amorgan.blurhash")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub blurhash: Option<String>, pub blurhash: Option<String>,

View File

@ -35,7 +35,6 @@ ruma_api! {
/// Optional reason for inviting the user. /// Optional reason for inviting the user.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<&'a str>, pub reason: Option<&'a str>,
} }

View File

@ -27,7 +27,6 @@ ruma_api! {
/// Optional reason for joining the room. /// Optional reason for joining the room.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<&'a str>, pub reason: Option<&'a str>,
} }

View File

@ -33,7 +33,6 @@ ruma_api! {
/// Optional reason for joining the room. /// Optional reason for joining the room.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<&'a str>, pub reason: Option<&'a str>,
} }

View File

@ -20,7 +20,6 @@ ruma_api! {
/// Optional reason to be included as the `reason` on the subsequent membership event. /// Optional reason to be included as the `reason` on the subsequent membership event.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<&'a str>, pub reason: Option<&'a str>,
} }

View File

@ -23,7 +23,6 @@ ruma_api! {
/// Optional reason for unbanning the user. /// Optional reason for unbanning the user.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<&'a str>, pub reason: Option<&'a str>,
} }

View File

@ -37,7 +37,6 @@ ruma_api! {
/// This uses the unstable prefix in /// This uses the unstable prefix in
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(rename = "xyz.amorgan.blurhash")] #[serde(rename = "xyz.amorgan.blurhash")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub blurhash: Option<String>, pub blurhash: Option<String>,

View File

@ -41,7 +41,6 @@ ruma_api! {
/// This uses the unstable prefix in /// This uses the unstable prefix in
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(rename = "xyz.amorgan.blurhash")] #[serde(rename = "xyz.amorgan.blurhash")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub blurhash: Option<String>, pub blurhash: Option<String>,

View File

@ -43,7 +43,6 @@ ruma_api! {
/// This uses the unstable prefix in /// This uses the unstable prefix in
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(rename = "xyz.amorgan.blurhash")] #[serde(rename = "xyz.amorgan.blurhash")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub blurhash: Option<&'a str>, pub blurhash: Option<&'a str>,

View File

@ -151,7 +151,6 @@ pub struct SsoLoginType {
/// This uses the unstable prefix in /// This uses the unstable prefix in
/// [MSC2858](https://github.com/matrix-org/matrix-doc/pull/2858). /// [MSC2858](https://github.com/matrix-org/matrix-doc/pull/2858).
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde( #[serde(
default, default,
rename = "org.matrix.msc2858.identity_providers", rename = "org.matrix.msc2858.identity_providers",
@ -169,7 +168,6 @@ impl SsoLoginType {
/// An SSO login identity provider. /// An SSO login identity provider.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[derive(Clone, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
pub struct IdentityProvider { pub struct IdentityProvider {
@ -199,7 +197,6 @@ impl IdentityProvider {
/// This uses the unstable prefix in /// This uses the unstable prefix in
/// [MSC2858](https://github.com/matrix-org/matrix-doc/pull/2858). /// [MSC2858](https://github.com/matrix-org/matrix-doc/pull/2858).
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)] #[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub enum IdentityProviderBrand { pub enum IdentityProviderBrand {

View File

@ -2,7 +2,6 @@
//! //!
//! This uses the unstable prefix in [MSC2858](https://github.com/matrix-org/matrix-doc/pull/2858). //! This uses the unstable prefix in [MSC2858](https://github.com/matrix-org/matrix-doc/pull/2858).
#![cfg(feature = "unstable-pre-spec")] #![cfg(feature = "unstable-pre-spec")]
#![cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
use ruma_api::ruma_api; use ruma_api::ruma_api;

View File

@ -174,7 +174,6 @@ pub struct Rooms {
/// The rooms that the user has knocked on. /// The rooms that the user has knocked on.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub knock: BTreeMap<RoomId, KnockedRoom>, pub knock: BTreeMap<RoomId, KnockedRoom>,
} }
@ -274,7 +273,6 @@ impl JoinedRoom {
/// Updates to knocked rooms. /// Updates to knocked rooms.
#[derive(Clone, Debug, Default, Deserialize, Serialize)] #[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub struct KnockedRoom { pub struct KnockedRoom {
/// The knock state. /// The knock state.
@ -284,7 +282,6 @@ pub struct KnockedRoom {
/// A mapping from a key `events` to a list of `StrippedStateEvent`. /// A mapping from a key `events` to a list of `StrippedStateEvent`.
#[derive(Clone, Debug, Default, Deserialize, Serialize)] #[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub struct KnockState { pub struct KnockState {
/// The list of events. /// The list of events.

View File

@ -57,7 +57,6 @@ pub enum AuthData<'a> {
/// Registration token-based authentication (`org.matrix.msc3231.login.registration_token`). /// Registration token-based authentication (`org.matrix.msc3231.login.registration_token`).
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
RegistrationToken(RegistrationToken<'a>), RegistrationToken(RegistrationToken<'a>),
/// Fallback acknowledgement. /// Fallback acknowledgement.
@ -377,7 +376,6 @@ pub enum AuthType {
/// Registration token-based authentication (`org.matrix.msc3231.login.registration_token`). /// Registration token-based authentication (`org.matrix.msc3231.login.registration_token`).
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[ruma_enum(rename = "org.matrix.msc3231.login.registration_token")] #[ruma_enum(rename = "org.matrix.msc3231.login.registration_token")]
RegistrationToken, RegistrationToken,
@ -601,7 +599,6 @@ impl IncomingDummy {
#[derive(Clone, Debug, Outgoing, Serialize)] #[derive(Clone, Debug, Outgoing, Serialize)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(tag = "type", rename = "org.matrix.msc3231.login.registration_token")] #[serde(tag = "type", rename = "org.matrix.msc3231.login.registration_token")]
pub struct RegistrationToken<'a> { pub struct RegistrationToken<'a> {
/// The registration token. /// The registration token.
@ -612,7 +609,6 @@ pub struct RegistrationToken<'a> {
} }
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
impl<'a> RegistrationToken<'a> { impl<'a> RegistrationToken<'a> {
/// Creates a new `RegistrationToken` with the given token. /// Creates a new `RegistrationToken` with the given token.
pub fn new(token: &'a str) -> Self { pub fn new(token: &'a str) -> Self {
@ -621,7 +617,6 @@ impl<'a> RegistrationToken<'a> {
} }
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
impl IncomingRegistrationToken { impl IncomingRegistrationToken {
/// Convert from `IncomingRegistrationToken` to `RegistrationToken`. /// Convert from `IncomingRegistrationToken` to `RegistrationToken`.
fn to_outgoing(&self) -> RegistrationToken<'_> { fn to_outgoing(&self) -> RegistrationToken<'_> {

View File

@ -108,7 +108,6 @@ extern crate hyper_rustls_crate as hyper_rustls;
extern crate isahc_crate as isahc; extern crate isahc_crate as isahc;
#[cfg(feature = "client-api")] #[cfg(feature = "client-api")]
#[cfg_attr(docsrs, doc(cfg(feature = "client-api")))]
mod client_api; mod client_api;
mod error; mod error;
pub mod http_client; pub mod http_client;

View File

@ -162,7 +162,6 @@ impl ConditionalPushRule {
/// Matches emoji reactions to a message /// Matches emoji reactions to a message
/// MSC2677: Annotations and Reactions /// MSC2677: Annotations and Reactions
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
pub fn reaction() -> Self { pub fn reaction() -> Self {
Self { Self {
actions: vec![DontNotify], actions: vec![DontNotify],

View File

@ -35,28 +35,20 @@ event_enum! {
"m.call.hangup", "m.call.hangup",
"m.call.candidates", "m.call.candidates",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.key.verification.ready", "m.key.verification.ready",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.key.verification.start", "m.key.verification.start",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.key.verification.cancel", "m.key.verification.cancel",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.key.verification.accept", "m.key.verification.accept",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.key.verification.key", "m.key.verification.key",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.key.verification.mac", "m.key.verification.mac",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.key.verification.done", "m.key.verification.done",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.reaction", "m.reaction",
"m.room.encrypted", "m.room.encrypted",
"m.room.message", "m.room.message",
@ -88,10 +80,8 @@ event_enum! {
"m.room.tombstone", "m.room.tombstone",
"m.room.topic", "m.room.topic",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.space.child", "m.space.child",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.space.parent", "m.space.parent",
} }
@ -103,7 +93,6 @@ event_enum! {
"m.forwarded_room_key", "m.forwarded_room_key",
"m.key.verification.request", "m.key.verification.request",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.key.verification.ready", "m.key.verification.ready",
"m.key.verification.start", "m.key.verification.start",
"m.key.verification.cancel", "m.key.verification.cancel",
@ -111,14 +100,11 @@ event_enum! {
"m.key.verification.key", "m.key.verification.key",
"m.key.verification.mac", "m.key.verification.mac",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.key.verification.done", "m.key.verification.done",
"m.room.encrypted", "m.room.encrypted",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.secret.request", "m.secret.request",
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
"m.secret.send", "m.secret.send",
} }
} }

View File

@ -13,12 +13,10 @@ use serde::{Deserialize, Serialize};
pub mod accept; pub mod accept;
pub mod cancel; pub mod cancel;
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
pub mod done; pub mod done;
pub mod key; pub mod key;
pub mod mac; pub mod mac;
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
pub mod ready; pub mod ready;
pub mod request; pub mod request;
pub mod start; pub mod start;
@ -123,7 +121,6 @@ impl ShortAuthenticationString {
/// A relation which associates an `m.key.verification.request` with another key verification event. /// A relation which associates an `m.key.verification.request` with another key verification event.
#[derive(Clone, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[serde(tag = "rel_type", rename = "m.reference")] #[serde(tag = "rel_type", rename = "m.reference")]
pub struct Relation { pub struct Relation {

View File

@ -43,7 +43,6 @@ impl ToDeviceKeyVerificationAcceptEventContent {
#[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[derive(Clone, Debug, Deserialize, Serialize, EventContent)]
#[ruma_event(type = "m.key.verification.accept", kind = Message)] #[ruma_event(type = "m.key.verification.accept", kind = Message)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub struct KeyVerificationAcceptEventContent { pub struct KeyVerificationAcceptEventContent {
/// The method specific content. /// The method specific content.

View File

@ -39,7 +39,6 @@ impl ToDeviceKeyVerificationCancelEventContent {
/// Cancels a key verification process/request. /// Cancels a key verification process/request.
#[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[derive(Clone, Debug, Deserialize, Serialize, EventContent)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[ruma_event(type = "m.key.verification.cancel", kind = Message)] #[ruma_event(type = "m.key.verification.cancel", kind = Message)]
pub struct KeyVerificationCancelEventContent { pub struct KeyVerificationCancelEventContent {

View File

@ -35,7 +35,6 @@ impl ToDeviceKeyVerificationKeyEventContent {
/// Sends the ephemeral public key for a device to the partner device. /// Sends the ephemeral public key for a device to the partner device.
#[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[derive(Clone, Debug, Deserialize, Serialize, EventContent)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[ruma_event(type = "m.key.verification.key", kind = Message)] #[ruma_event(type = "m.key.verification.key", kind = Message)]
pub struct KeyVerificationKeyEventContent { pub struct KeyVerificationKeyEventContent {

View File

@ -43,7 +43,6 @@ impl ToDeviceKeyVerificationMacEventContent {
/// Sends the MAC of a device's key to the partner device. /// Sends the MAC of a device's key to the partner device.
#[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[derive(Clone, Debug, Deserialize, Serialize, EventContent)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[ruma_event(type = "m.key.verification.mac", kind = Message)] #[ruma_event(type = "m.key.verification.mac", kind = Message)]
pub struct KeyVerificationMacEventContent { pub struct KeyVerificationMacEventContent {

View File

@ -48,7 +48,6 @@ impl ToDeviceKeyVerificationStartEventContent {
/// Begins an SAS key verification process. /// Begins an SAS key verification process.
#[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[derive(Clone, Debug, Deserialize, Serialize, EventContent)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[ruma_event(type = "m.key.verification.start", kind = Message)] #[ruma_event(type = "m.key.verification.start", kind = Message)]
pub struct KeyVerificationStartEventContent { pub struct KeyVerificationStartEventContent {

View File

@ -162,33 +162,27 @@ pub mod fully_read;
pub mod ignored_user_list; pub mod ignored_user_list;
pub mod key; pub mod key;
#[cfg(feature = "unstable-pdu")] #[cfg(feature = "unstable-pdu")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pdu")))]
pub mod pdu; pub mod pdu;
pub mod policy; pub mod policy;
pub mod presence; pub mod presence;
pub mod push_rules; pub mod push_rules;
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
pub mod reaction; pub mod reaction;
pub mod receipt; pub mod receipt;
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
pub mod relation; pub mod relation;
pub mod room; pub mod room;
pub mod room_key; pub mod room_key;
pub mod room_key_request; pub mod room_key_request;
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
pub mod secret; pub mod secret;
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
pub mod space; pub mod space;
pub mod sticker; pub mod sticker;
pub mod tag; pub mod tag;
pub mod typing; pub mod typing;
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
pub use self::relation::Relations; pub use self::relation::Relations;
pub use self::{ pub use self::{
enums::*, enums::*,

View File

@ -44,7 +44,6 @@ pub struct RoomV1Pdu {
pub sender: UserId, pub sender: UserId,
#[cfg(not(feature = "unstable-pre-spec"))] #[cfg(not(feature = "unstable-pre-spec"))]
#[cfg_attr(docsrs, doc(cfg(not(feature = "unstable-pre-spec"))))]
/// The `server_name` of the homeserver that created this event. /// The `server_name` of the homeserver that created this event.
pub origin: String, pub origin: String,
@ -104,7 +103,6 @@ pub struct RoomV3Pdu {
pub sender: UserId, pub sender: UserId,
#[cfg(not(feature = "unstable-pre-spec"))] #[cfg(not(feature = "unstable-pre-spec"))]
#[cfg_attr(docsrs, doc(cfg(not(feature = "unstable-pre-spec"))))]
/// The `server_name` of the homeserver that created this event. /// The `server_name` of the homeserver that created this event.
pub origin: String, pub origin: String,

View File

@ -65,7 +65,6 @@ pub struct ImageInfo {
/// This uses the unstable prefix in /// This uses the unstable prefix in
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(rename = "xyz.amorgan.blurhash")] #[serde(rename = "xyz.amorgan.blurhash")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub blurhash: Option<String>, pub blurhash: Option<String>,

View File

@ -85,7 +85,6 @@ pub struct ImageInfo {
/// This uses the unstable prefix in /// This uses the unstable prefix in
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(rename = "xyz.amorgan.blurhash")] #[serde(rename = "xyz.amorgan.blurhash")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub blurhash: Option<String>, pub blurhash: Option<String>,

View File

@ -96,17 +96,14 @@ pub enum Relation {
/// An event that replaces another event. /// An event that replaces another event.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
Replacement(Replacement), Replacement(Replacement),
/// A reference to another event. /// A reference to another event.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
Reference(Reference), Reference(Reference),
/// An annotation to an event. /// An annotation to an event.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
Annotation(Annotation), Annotation(Annotation),
#[doc(hidden)] #[doc(hidden)]
@ -119,7 +116,6 @@ pub enum Relation {
/// is part of the encrypted content of an `m.room.encrypted` events. /// is part of the encrypted content of an `m.room.encrypted` events.
#[derive(Clone, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub struct Replacement { pub struct Replacement {
/// The ID of the event being replacing. /// The ID of the event being replacing.
@ -129,7 +125,6 @@ pub struct Replacement {
/// A reference to another event. /// A reference to another event.
#[derive(Clone, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub struct Reference { pub struct Reference {
/// The event we are referencing. /// The event we are referencing.
@ -147,7 +142,6 @@ impl Reference {
/// An annotation for an event. /// An annotation for an event.
#[derive(Clone, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub struct Annotation { pub struct Annotation {
/// The event that is being annotated. /// The event that is being annotated.

View File

@ -74,7 +74,6 @@ pub struct RoomMemberEventContent {
/// This uses the unstable prefix in /// This uses the unstable prefix in
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(rename = "xyz.amorgan.blurhash")] #[serde(rename = "xyz.amorgan.blurhash")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub blurhash: Option<String>, pub blurhash: Option<String>,
@ -90,7 +89,6 @@ pub struct RoomMemberEventContent {
/// the potential for spam and abuse. Hiding the reason behind a button or other component /// the potential for spam and abuse. Hiding the reason behind a button or other component
/// is recommended. /// is recommended.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<String>, pub reason: Option<String>,
} }

View File

@ -173,7 +173,6 @@ pub enum MessageType {
/// A request to initiate a key verification. /// A request to initiate a key verification.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
VerificationRequest(KeyVerificationRequestEventContent), VerificationRequest(KeyVerificationRequestEventContent),
/// A custom message. /// A custom message.
@ -311,7 +310,6 @@ pub enum Relation {
/// An event that replaces another event. /// An event that replaces another event.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
Replacement(Replacement), Replacement(Replacement),
#[doc(hidden)] #[doc(hidden)]
@ -336,7 +334,6 @@ impl InReplyTo {
/// The event this relation belongs to replaces another event. /// The event this relation belongs to replaces another event.
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub struct Replacement { pub struct Replacement {
/// The ID of the event being replacing. /// The ID of the event being replacing.
@ -446,7 +443,6 @@ impl EmoteMessageEventContent {
/// Returns an html emote message if some markdown formatting was detected, otherwise returns a /// Returns an html emote message if some markdown formatting was detected, otherwise returns a
/// plain-text emote. /// plain-text emote.
#[cfg(feature = "markdown")] #[cfg(feature = "markdown")]
#[cfg_attr(docsrs, doc(cfg(feature = "markdown")))]
pub fn markdown(body: impl AsRef<str> + Into<String>) -> Self { pub fn markdown(body: impl AsRef<str> + Into<String>) -> Self {
Self { formatted: FormattedBody::markdown(&body), ..Self::plain(body) } Self { formatted: FormattedBody::markdown(&body), ..Self::plain(body) }
} }
@ -652,7 +648,6 @@ impl NoticeMessageEventContent {
/// Returns an html notice if some markdown formatting was detected, otherwise returns a plain /// Returns an html notice if some markdown formatting was detected, otherwise returns a plain
/// text notice. /// text notice.
#[cfg(feature = "markdown")] #[cfg(feature = "markdown")]
#[cfg_attr(docsrs, doc(cfg(feature = "markdown")))]
pub fn markdown(body: impl AsRef<str> + Into<String>) -> Self { pub fn markdown(body: impl AsRef<str> + Into<String>) -> Self {
Self { formatted: FormattedBody::markdown(&body), ..Self::plain(body) } Self { formatted: FormattedBody::markdown(&body), ..Self::plain(body) }
} }
@ -781,7 +776,6 @@ impl FormattedBody {
/// ///
/// Returns `None` if no markdown formatting was found. /// Returns `None` if no markdown formatting was found.
#[cfg(feature = "markdown")] #[cfg(feature = "markdown")]
#[cfg_attr(docsrs, doc(cfg(feature = "markdown")))]
pub fn markdown(body: impl AsRef<str>) -> Option<Self> { pub fn markdown(body: impl AsRef<str>) -> Option<Self> {
let body = body.as_ref(); let body = body.as_ref();
let mut html_body = String::new(); let mut html_body = String::new();
@ -821,7 +815,6 @@ impl TextMessageEventContent {
/// Returns an html message if some markdown formatting was detected, otherwise returns a plain /// Returns an html message if some markdown formatting was detected, otherwise returns a plain
/// text message. /// text message.
#[cfg(feature = "markdown")] #[cfg(feature = "markdown")]
#[cfg_attr(docsrs, doc(cfg(feature = "markdown")))]
pub fn markdown(body: impl AsRef<str> + Into<String>) -> Self { pub fn markdown(body: impl AsRef<str> + Into<String>) -> Self {
Self { formatted: FormattedBody::markdown(&body), ..Self::plain(body) } Self { formatted: FormattedBody::markdown(&body), ..Self::plain(body) }
} }
@ -912,7 +905,6 @@ pub struct VideoInfo {
/// This uses the unstable prefix in /// This uses the unstable prefix in
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(rename = "xyz.amorgan.blurhash")] #[serde(rename = "xyz.amorgan.blurhash")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub blurhash: Option<String>, pub blurhash: Option<String>,
@ -928,7 +920,6 @@ impl VideoInfo {
/// The payload for a key verification request message. /// The payload for a key verification request message.
#[derive(Clone, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[serde(tag = "msgtype", rename = "m.key.verification.request")] #[serde(tag = "msgtype", rename = "m.key.verification.request")]
pub struct KeyVerificationRequestEventContent { pub struct KeyVerificationRequestEventContent {

View File

@ -24,7 +24,6 @@ pub struct Unsigned {
/// Server-compiled information from other events relating to this event. /// Server-compiled information from other events relating to this event.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(rename = "m.relations", skip_serializing_if = "Option::is_none")] #[serde(rename = "m.relations", skip_serializing_if = "Option::is_none")]
pub relations: Option<Relations>, pub relations: Option<Relations>,
} }
@ -86,7 +85,6 @@ pub struct UnsignedWithPrevContent {
transaction_id: Option<String>, transaction_id: Option<String>,
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(rename = "m.relations", skip_serializing_if = "Option::is_none")] #[serde(rename = "m.relations", skip_serializing_if = "Option::is_none")]
relations: Option<Relations>, relations: Option<Relations>,

View File

@ -31,13 +31,11 @@ ruma_api! {
/// Information on the master cross-signing keys of the queried users. /// Information on the master cross-signing keys of the queried users.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub master_keys: BTreeMap<UserId, CrossSigningKey>, pub master_keys: BTreeMap<UserId, CrossSigningKey>,
/// Information on the self-signing keys of the queried users. /// Information on the self-signing keys of the queried users.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub self_signing_keys: BTreeMap<UserId, CrossSigningKey>, pub self_signing_keys: BTreeMap<UserId, CrossSigningKey>,
} }

View File

@ -18,7 +18,6 @@ pub mod discovery;
pub mod event; pub mod event;
pub mod keys; pub mod keys;
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
pub mod knock; pub mod knock;
pub mod membership; pub mod membership;
pub mod openid; pub mod openid;

View File

@ -11,7 +11,6 @@ use serde_json::value::RawValue as RawJsonValue;
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub struct RoomState { pub struct RoomState {
#[cfg(not(feature = "unstable-pre-spec"))] #[cfg(not(feature = "unstable-pre-spec"))]
#[cfg_attr(docsrs, doc(cfg(not(feature = "unstable-pre-spec"))))]
/// The resident server's DNS name. /// The resident server's DNS name.
pub origin: String, pub origin: String,

View File

@ -47,7 +47,6 @@ ruma_api! {
/// This uses the unstable prefix in /// This uses the unstable prefix in
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
#[serde(rename = "xyz.amorgan.blurhash")] #[serde(rename = "xyz.amorgan.blurhash")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub blurhash: Option<String>, pub blurhash: Option<String>,

View File

@ -12,7 +12,6 @@ opaque_identifier! {
impl DeviceId { impl DeviceId {
/// Generates a random `DeviceId`, suitable for assignment to a new device. /// Generates a random `DeviceId`, suitable for assignment to a new device.
#[cfg(feature = "rand")] #[cfg(feature = "rand")]
#[cfg_attr(docsrs, doc(cfg(feature = "rand")))]
pub fn new() -> Box<Self> { pub fn new() -> Box<Self> {
Self::from_owned(generate_localpart(8)) Self::from_owned(generate_localpart(8))
} }

View File

@ -57,7 +57,6 @@ impl EventId {
/// Does not currently ever fail, but may fail in the future if the homeserver cannot be parsed /// Does not currently ever fail, but may fail in the future if the homeserver cannot be parsed
/// parsed as a valid host. /// parsed as a valid host.
#[cfg(feature = "rand")] #[cfg(feature = "rand")]
#[cfg_attr(docsrs, doc(cfg(feature = "rand")))]
pub fn new(server_name: &ServerName) -> Self { pub fn new(server_name: &ServerName) -> Self {
use crate::generate_localpart; use crate::generate_localpart;

View File

@ -35,7 +35,6 @@ impl RoomId {
/// ///
/// Fails if the given homeserver cannot be parsed as a valid host. /// Fails if the given homeserver cannot be parsed as a valid host.
#[cfg(feature = "rand")] #[cfg(feature = "rand")]
#[cfg_attr(docsrs, doc(cfg(feature = "rand")))]
pub fn new(server_name: &ServerName) -> Self { pub fn new(server_name: &ServerName) -> Self {
use crate::generate_localpart; use crate::generate_localpart;

View File

@ -63,7 +63,6 @@ impl RoomIdOrAliasId {
/// Turn this `RoomIdOrAliasId` into `Either<RoomId, RoomAliasId>` /// Turn this `RoomIdOrAliasId` into `Either<RoomId, RoomAliasId>`
#[cfg(feature = "either")] #[cfg(feature = "either")]
#[cfg_attr(docsrs, doc(cfg(feature = "either")))]
pub fn into_either(self) -> either::Either<RoomId, RoomAliasId> { pub fn into_either(self) -> either::Either<RoomId, RoomAliasId> {
match self.variant() { match self.variant() {
Variant::RoomId => { Variant::RoomId => {

View File

@ -44,17 +44,14 @@ pub enum RoomVersionId {
/// A version 7 room. /// A version 7 room.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
Version7, Version7,
/// A version 8 room. /// A version 8 room.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
Version8, Version8,
/// A version 9 room. /// A version 9 room.
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
Version9, Version9,
#[doc(hidden)] #[doc(hidden)]

View File

@ -40,7 +40,6 @@ impl UserId {
/// Attempts to generate a `UserId` for the given origin server with a localpart consisting of /// Attempts to generate a `UserId` for the given origin server with a localpart consisting of
/// 12 random ASCII characters. /// 12 random ASCII characters.
#[cfg(feature = "rand")] #[cfg(feature = "rand")]
#[cfg_attr(docsrs, doc(cfg(feature = "rand")))]
pub fn new(server_name: &ServerName) -> Self { pub fn new(server_name: &ServerName) -> Self {
use crate::generate_localpart; use crate::generate_localpart;

View File

@ -92,19 +92,15 @@ pub use ruma_identifiers::{
}; };
#[cfg(feature = "client")] #[cfg(feature = "client")]
#[cfg_attr(docsrs, doc(cfg(feature = "client")))]
#[doc(inline)] #[doc(inline)]
pub use ruma_client as client; pub use ruma_client as client;
#[cfg(feature = "events")] #[cfg(feature = "events")]
#[cfg_attr(docsrs, doc(cfg(feature = "events")))]
#[doc(inline)] #[doc(inline)]
pub use ruma_events as events; pub use ruma_events as events;
#[cfg(feature = "signatures")] #[cfg(feature = "signatures")]
#[cfg_attr(docsrs, doc(cfg(feature = "signatures")))]
#[doc(inline)] #[doc(inline)]
pub use ruma_signatures as signatures; pub use ruma_signatures as signatures;
#[cfg(feature = "state-res")] #[cfg(feature = "state-res")]
#[cfg_attr(docsrs, doc(cfg(feature = "state-res")))]
#[doc(inline)] #[doc(inline)]
pub use ruma_state_res as state_res; pub use ruma_state_res as state_res;
@ -113,7 +109,6 @@ pub use ruma_state_res as state_res;
/// ///
/// [apis]: https://matrix.org/docs/spec/#matrix-apis /// [apis]: https://matrix.org/docs/spec/#matrix-apis
#[cfg(feature = "api")] #[cfg(feature = "api")]
#[cfg_attr(docsrs, doc(cfg(feature = "api")))]
pub mod api { pub mod api {
pub use ruma_api::*; pub use ruma_api::*;