diff --git a/crates/ruma-events/src/call.rs b/crates/ruma-events/src/call.rs index 6d55a5a9..55115640 100644 --- a/crates/ruma-events/src/call.rs +++ b/crates/ruma-events/src/call.rs @@ -1,4 +1,4 @@ -//! Modules for events in the *m.call* namespace. +//! Modules for events in the `m.call` namespace. //! //! This module also contains types shared by events in its child namespaces. diff --git a/crates/ruma-events/src/call/answer.rs b/crates/ruma-events/src/call/answer.rs index 3ee99a60..1ec19d67 100644 --- a/crates/ruma-events/src/call/answer.rs +++ b/crates/ruma-events/src/call/answer.rs @@ -1,4 +1,4 @@ -//! Types for the *m.call.answer* event. +//! Types for the `m.call.answer` event. use js_int::UInt; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/call/candidates.rs b/crates/ruma-events/src/call/candidates.rs index ce3e2830..15c385d6 100644 --- a/crates/ruma-events/src/call/candidates.rs +++ b/crates/ruma-events/src/call/candidates.rs @@ -1,4 +1,4 @@ -//! Types for the *m.call.candidates* event. +//! Types for the `m.call.candidates` event. use js_int::UInt; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/call/hangup.rs b/crates/ruma-events/src/call/hangup.rs index b91b8a36..3fdacf9d 100644 --- a/crates/ruma-events/src/call/hangup.rs +++ b/crates/ruma-events/src/call/hangup.rs @@ -1,4 +1,4 @@ -//! Types for the *m.call.hangup* event. +//! Types for the `m.call.hangup` event. use js_int::UInt; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/call/invite.rs b/crates/ruma-events/src/call/invite.rs index 79b00c57..08a2ac13 100644 --- a/crates/ruma-events/src/call/invite.rs +++ b/crates/ruma-events/src/call/invite.rs @@ -1,4 +1,4 @@ -//! Types for the *m.call.invite* event. +//! Types for the `m.call.invite` event. use js_int::UInt; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/direct.rs b/crates/ruma-events/src/direct.rs index 4b6d43c7..e931e9f3 100644 --- a/crates/ruma-events/src/direct.rs +++ b/crates/ruma-events/src/direct.rs @@ -1,4 +1,4 @@ -//! Types for the *m.direct* event. +//! Types for the `m.direct` event. use std::{ collections::BTreeMap, diff --git a/crates/ruma-events/src/dummy.rs b/crates/ruma-events/src/dummy.rs index c68b4f37..98f8a803 100644 --- a/crates/ruma-events/src/dummy.rs +++ b/crates/ruma-events/src/dummy.rs @@ -1,4 +1,4 @@ -//! Types for the *m.dummy* event. +//! Types for the `m.dummy` event. use std::fmt; @@ -12,12 +12,12 @@ use serde::{ /// /// This event is used to indicate new Olm sessions for end-to-end encryption. /// -/// Typically it is encrypted as an *m.room.encrypted* event, then sent as a to-device event. +/// Typically it is encrypted as an `m.room.encrypted` event, then sent as a to-device event. /// /// The event does not have any content associated with it. The sending client is expected to /// send a key share request shortly after this message, causing the receiving client to process -/// this *m.dummy* event as the most recent event and using the keyshare request to set up the -/// session. The keyshare request and *m.dummy* combination should result in the original sending +/// this `m.dummy` event as the most recent event and using the keyshare request to set up the +/// session. The keyshare request and `m.dummy` combination should result in the original sending /// client receiving keys over the newly established session. #[derive(Clone, Debug, Default, EventContent)] #[allow(clippy::exhaustive_structs)] diff --git a/crates/ruma-events/src/forwarded_room_key.rs b/crates/ruma-events/src/forwarded_room_key.rs index 742cedb2..08a2a2c0 100644 --- a/crates/ruma-events/src/forwarded_room_key.rs +++ b/crates/ruma-events/src/forwarded_room_key.rs @@ -1,4 +1,4 @@ -//! Types for the *m.forwarded_room_key* event. +//! Types for the `m.forwarded_room_key` event. use ruma_events_macros::EventContent; use ruma_identifiers::{EventEncryptionAlgorithm, RoomId}; diff --git a/crates/ruma-events/src/fully_read.rs b/crates/ruma-events/src/fully_read.rs index 68341f61..5dc471c7 100644 --- a/crates/ruma-events/src/fully_read.rs +++ b/crates/ruma-events/src/fully_read.rs @@ -1,4 +1,4 @@ -//! Types for the *m.fully_read* event. +//! Types for the `m.fully_read` event. use ruma_events_macros::EventContent; use ruma_identifiers::EventId; diff --git a/crates/ruma-events/src/ignored_user_list.rs b/crates/ruma-events/src/ignored_user_list.rs index 836760fe..4e51f239 100644 --- a/crates/ruma-events/src/ignored_user_list.rs +++ b/crates/ruma-events/src/ignored_user_list.rs @@ -1,4 +1,4 @@ -//! Types for the *m.ignored_user_list* event. +//! Types for the `m.ignored_user_list` event. use ruma_events_macros::EventContent; use ruma_identifiers::UserId; diff --git a/crates/ruma-events/src/key.rs b/crates/ruma-events/src/key.rs index ccc5d32e..049b4d13 100644 --- a/crates/ruma-events/src/key.rs +++ b/crates/ruma-events/src/key.rs @@ -1,3 +1,3 @@ -//! Modules for events in the *m.key* namespace. +//! Modules for events in the `m.key` namespace. pub mod verification; diff --git a/crates/ruma-events/src/key/verification.rs b/crates/ruma-events/src/key/verification.rs index bd2c47af..3cfce2c1 100644 --- a/crates/ruma-events/src/key/verification.rs +++ b/crates/ruma-events/src/key/verification.rs @@ -1,4 +1,4 @@ -//! Modules for events in the *m.key.verification* namespace. +//! Modules for events in the `m.key.verification` namespace. //! //! This module also contains types shared by events in its child namespaces. //! @@ -146,21 +146,21 @@ impl Relation { #[derive(Clone, Debug, PartialEq, Eq, StringEnum)] #[non_exhaustive] pub enum VerificationMethod { - /// The *m.sas.v1* verification method. + /// The `m.sas.v1` verification method. #[ruma_enum(rename = "m.sas.v1")] SasV1, - /// The *m.qr_code.scan.v1* verification method. + /// The `m.qr_code.scan.v1` verification method. #[cfg(feature = "unstable-pre-spec")] #[ruma_enum(rename = "m.qr_code.scan.v1")] QrCodeScanV1, - /// The *m.qr_code.show.v1* verification method. + /// The `m.qr_code.show.v1` verification method. #[cfg(feature = "unstable-pre-spec")] #[ruma_enum(rename = "m.qr_code.show.v1")] QrCodeShowV1, - /// The *m.reciprocate.v1* verification method. + /// The `m.reciprocate.v1` verification method. #[cfg(feature = "unstable-pre-spec")] #[ruma_enum(rename = "m.reciprocate.v1")] ReciprocateV1, diff --git a/crates/ruma-events/src/key/verification/accept.rs b/crates/ruma-events/src/key/verification/accept.rs index 6d655f61..0e9515b8 100644 --- a/crates/ruma-events/src/key/verification/accept.rs +++ b/crates/ruma-events/src/key/verification/accept.rs @@ -1,4 +1,4 @@ -//! Types for the *m.key.verification.accept* event. +//! Types for the `m.key.verification.accept` event. use std::collections::BTreeMap; @@ -14,14 +14,14 @@ use super::{ /// The content of a to-device `m.key.verification.accept` event. /// -/// Accepts a previously sent *m.key.verification.start* message. +/// Accepts a previously sent `m.key.verification.start` message. #[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[ruma_event(type = "m.key.verification.accept", kind = ToDevice)] pub struct ToDeviceAcceptEventContent { /// An opaque identifier for the verification process. /// - /// Must be the same as the one used for the *m.key.verification.start* message. + /// Must be the same as the one used for the `m.key.verification.start` message. pub transaction_id: String, /// The method specific content. @@ -39,7 +39,7 @@ impl ToDeviceAcceptEventContent { /// The content of a in-room `m.key.verification.accept` event. /// -/// Accepts a previously sent *m.key.verification.start* message. +/// Accepts a previously sent `m.key.verification.start` message. #[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[ruma_event(type = "m.key.verification.accept", kind = Message)] #[cfg(feature = "unstable-pre-spec")] @@ -64,12 +64,12 @@ impl AcceptEventContent { } } -/// An enum representing the different method specific *m.key.verification.accept* content. +/// An enum representing the different method specific `m.key.verification.accept` content. #[derive(Clone, Debug, Deserialize, Serialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[serde(untagged)] pub enum AcceptMethod { - /// The *m.sas.v1* verification method. + /// The `m.sas.v1` verification method. SasV1(SasV1Content), /// Any unknown accept method. @@ -90,33 +90,33 @@ pub struct _CustomContent { pub data: BTreeMap, } -/// The payload of an *m.key.verification.accept* event using the *m.sas.v1* method. +/// The payload of an `m.key.verification.accept` event using the `m.sas.v1` method. #[derive(Clone, Debug, Deserialize, Serialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[serde(rename = "m.sas.v1", tag = "method")] pub struct SasV1Content { /// The key agreement protocol the device is choosing to use, out of the - /// options in the *m.key.verification.start* message. + /// options in the `m.key.verification.start` message. pub key_agreement_protocol: KeyAgreementProtocol, /// The hash method the device is choosing to use, out of the options in the - /// *m.key.verification.start* message. + /// `m.key.verification.start` message. pub hash: HashAlgorithm, /// The message authentication code the device is choosing to use, out of - /// the options in the *m.key.verification.start* message. + /// the options in the `m.key.verification.start` message. pub message_authentication_code: MessageAuthenticationCode, /// The SAS methods both devices involved in the verification process /// understand. /// - /// Must be a subset of the options in the *m.key.verification.start* + /// Must be a subset of the options in the `m.key.verification.start` /// message. pub short_authentication_string: Vec, /// The hash (encoded as unpadded base64) of the concatenation of the /// device's ephemeral public key (encoded as unpadded base64) and the - /// canonical JSON representation of the *m.key.verification.start* message. + /// canonical JSON representation of the `m.key.verification.start` message. pub commitment: String, } @@ -125,11 +125,11 @@ pub struct SasV1Content { #[allow(clippy::exhaustive_structs)] pub struct SasV1ContentInit { /// The key agreement protocol the device is choosing to use, out of the - /// options in the *m.key.verification.start* message. + /// options in the `m.key.verification.start` message. pub key_agreement_protocol: KeyAgreementProtocol, /// The hash method the device is choosing to use, out of the options in the - /// *m.key.verification.start* message. + /// `m.key.verification.start` message. pub hash: HashAlgorithm, /// The message authentication codes that the accepting device understands. @@ -138,13 +138,13 @@ pub struct SasV1ContentInit { /// The SAS methods both devices involved in the verification process /// understand. /// - /// Must be a subset of the options in the *m.key.verification.start* + /// Must be a subset of the options in the `m.key.verification.start` /// message. pub short_authentication_string: Vec, /// The hash (encoded as unpadded base64) of the concatenation of the /// device's ephemeral public key (encoded as unpadded base64) and the - /// canonical JSON representation of the *m.key.verification.start* message. + /// canonical JSON representation of the `m.key.verification.start` message. pub commitment: String, } diff --git a/crates/ruma-events/src/key/verification/cancel.rs b/crates/ruma-events/src/key/verification/cancel.rs index b29a9033..445d6acf 100644 --- a/crates/ruma-events/src/key/verification/cancel.rs +++ b/crates/ruma-events/src/key/verification/cancel.rs @@ -1,4 +1,4 @@ -//! Types for the *m.key.verification.cancel* event. +//! Types for the `m.key.verification.cancel` event. use ruma_events_macros::EventContent; use ruma_serde::StringEnum; @@ -89,7 +89,7 @@ pub enum CancelCode { /// The device does not know how to handle the requested method. /// - /// Should be sent for *m.key.verification.start* messages and messages defined by individual + /// Should be sent for `m.key.verification.start` messages and messages defined by individual /// verification processes. #[ruma_enum(rename = "m.unknown_method")] UnknownMethod, @@ -112,7 +112,7 @@ pub enum CancelCode { #[ruma_enum(rename = "m.invalid_message")] InvalidMessage, - /// An *m.key.verification.request* was accepted by a different device. + /// An `m.key.verification.request` was accepted by a different device. /// /// The device receiving this error can ignore the verification request. #[ruma_enum(rename = "m.accepted")] diff --git a/crates/ruma-events/src/key/verification/done.rs b/crates/ruma-events/src/key/verification/done.rs index a80806a1..b435b972 100644 --- a/crates/ruma-events/src/key/verification/done.rs +++ b/crates/ruma-events/src/key/verification/done.rs @@ -1,4 +1,4 @@ -//! Types for the *m.key.verification.done* event. +//! Types for the `m.key.verification.done` event. use ruma_events_macros::EventContent; use serde::{Deserialize, Serialize}; @@ -14,7 +14,7 @@ use super::Relation; pub struct ToDeviceDoneEventContent { /// An opaque identifier for the verification process. /// - /// Must be the same as the one used for the *m.key.verification.start* message. + /// Must be the same as the one used for the `m.key.verification.start` message. pub transaction_id: String, } diff --git a/crates/ruma-events/src/key/verification/key.rs b/crates/ruma-events/src/key/verification/key.rs index 62396509..0a1a1762 100644 --- a/crates/ruma-events/src/key/verification/key.rs +++ b/crates/ruma-events/src/key/verification/key.rs @@ -1,4 +1,4 @@ -//! Types for the *m.key.verification.key* event. +//! Types for the `m.key.verification.key` event. use ruma_events_macros::EventContent; use serde::{Deserialize, Serialize}; @@ -15,7 +15,7 @@ use super::Relation; pub struct ToDeviceKeyEventContent { /// An opaque identifier for the verification process. /// - /// Must be the same as the one used for the *m.key.verification.start* message. + /// Must be the same as the one used for the `m.key.verification.start` message. pub transaction_id: String, /// The device's ephemeral public key, encoded as unpadded Base64. diff --git a/crates/ruma-events/src/key/verification/mac.rs b/crates/ruma-events/src/key/verification/mac.rs index 37a5615a..5c22cfeb 100644 --- a/crates/ruma-events/src/key/verification/mac.rs +++ b/crates/ruma-events/src/key/verification/mac.rs @@ -1,4 +1,4 @@ -//! Types for the *m.key.verification.mac* event. +//! Types for the `m.key.verification.mac` event. use std::collections::BTreeMap; @@ -17,7 +17,7 @@ use super::Relation; pub struct ToDeviceMacEventContent { /// An opaque identifier for the verification process. /// - /// Must be the same as the one used for the *m.key.verification.start* message. + /// Must be the same as the one used for the `m.key.verification.start` message. pub transaction_id: String, /// A map of the key ID to the MAC of the key, using the algorithm in the verification process. diff --git a/crates/ruma-events/src/key/verification/ready.rs b/crates/ruma-events/src/key/verification/ready.rs index ba53d3a7..16f3d309 100644 --- a/crates/ruma-events/src/key/verification/ready.rs +++ b/crates/ruma-events/src/key/verification/ready.rs @@ -1,4 +1,4 @@ -//! Types for the *m.key.verification.ready* event. +//! Types for the `m.key.verification.ready` event. use ruma_events_macros::EventContent; use ruma_identifiers::DeviceIdBox; @@ -8,7 +8,7 @@ use super::{Relation, VerificationMethod}; /// The content of a to-device `m.m.key.verification.ready` event. /// -/// Response to a previously sent *m.key.verification.request* message. +/// Response to a previously sent `m.key.verification.request` message. #[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[ruma_event(type = "m.key.verification.ready", kind = ToDevice)] @@ -22,7 +22,7 @@ pub struct ToDeviceReadyEventContent { /// An opaque identifier for the verification process. /// /// Must be unique with respect to the devices involved. Must be the same as the - /// `transaction_id` given in the *m.key.verification.request* from a + /// `transaction_id` given in the `m.key.verification.request` from a /// request. pub transaction_id: String, } @@ -41,7 +41,7 @@ impl ToDeviceReadyEventContent { /// The content of an in-room `m.m.key.verification.ready` event. /// -/// Response to a previously sent *m.key.verification.request* message. +/// Response to a previously sent `m.key.verification.request` message. #[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[ruma_event(type = "m.key.verification.ready", kind = Message)] diff --git a/crates/ruma-events/src/key/verification/request.rs b/crates/ruma-events/src/key/verification/request.rs index fd1eb0d6..c26b13c3 100644 --- a/crates/ruma-events/src/key/verification/request.rs +++ b/crates/ruma-events/src/key/verification/request.rs @@ -1,4 +1,4 @@ -//! Types for the *m.key.verification.request* event. +//! Types for the `m.key.verification.request` event. use ruma_common::MilliSecondsSinceUnixEpoch; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/key/verification/start.rs b/crates/ruma-events/src/key/verification/start.rs index d6f8e730..33e6a58f 100644 --- a/crates/ruma-events/src/key/verification/start.rs +++ b/crates/ruma-events/src/key/verification/start.rs @@ -1,4 +1,4 @@ -//! Types for the *m.key.verification.start* event. +//! Types for the `m.key.verification.start` event. use std::collections::BTreeMap; @@ -26,7 +26,7 @@ pub struct ToDeviceStartEventContent { /// An opaque identifier for the verification process. /// /// Must be unique with respect to the devices involved. Must be the same as the - /// `transaction_id` given in the *m.key.verification.request* if this process is originating + /// `transaction_id` given in the `m.key.verification.request` if this process is originating /// from a request. pub transaction_id: String, @@ -72,15 +72,15 @@ impl StartEventContent { } } -/// An enum representing the different method specific *m.key.verification.start* content. +/// An enum representing the different method specific `m.key.verification.start` content. #[derive(Clone, Debug, Deserialize, Serialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[serde(untagged)] pub enum StartMethod { - /// The *m.sas.v1* verification method. + /// The `m.sas.v1` verification method. SasV1(SasV1Content), - /// The *m.reciprocate.v1* verification method. + /// The `m.reciprocate.v1` verification method. /// /// The spec entry for this method can be found [here][1]. /// @@ -106,7 +106,7 @@ pub struct _CustomContent { pub data: BTreeMap, } -/// The payload of an *m.key.verification.start* event using the *m.sas.v1* method. +/// The payload of an `m.key.verification.start` event using the `m.sas.v1` method. #[derive(Clone, Debug, Deserialize, Serialize)] #[cfg(feature = "unstable-pre-spec")] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] @@ -127,7 +127,7 @@ impl ReciprocateV1Content { } } -/// The payload of an *m.key.verification.start* event using the *m.sas.v1* method. +/// The payload of an `m.key.verification.start` event using the `m.sas.v1` method. /// /// To create an instance of this type, first create a `SasV1ContentInit` and convert it via /// `SasV1Content::from` / `.into()`. diff --git a/crates/ruma-events/src/lib.rs b/crates/ruma-events/src/lib.rs index 471f8b48..a1cfc1a8 100644 --- a/crates/ruma-events/src/lib.rs +++ b/crates/ruma-events/src/lib.rs @@ -18,14 +18,14 @@ //! all the event types defined by the Matrix specification. Matrix event types are serialized to //! JSON strings in [reverse domain name //! notation](https://en.wikipedia.org/wiki/Reverse_domain_name_notation), although the core event -//! types all use the special "m" TLD, e.g. *m.room.message*. +//! types all use the special "m" TLD, e.g. `m.room.message`. //! //! # Core event types //! //! ruma-events includes Rust types for every one of the event types in the Matrix specification. //! To better organize the crate, these types live in separate modules with a hierarchy that //! matches the reverse domain name notation of the event type. -//! For example, the *m.room.message* event lives at `ruma_events::room::message::MessageEvent`. +//! For example, the `m.room.message` event lives at `ruma_events::room::message::MessageEvent`. //! Each type's module also contains a Rust type for that event type's `content` field, and any //! other supporting types required by the event's other fields. //! diff --git a/crates/ruma-events/src/policy.rs b/crates/ruma-events/src/policy.rs index d58e3b2b..d824f201 100644 --- a/crates/ruma-events/src/policy.rs +++ b/crates/ruma-events/src/policy.rs @@ -1,3 +1,3 @@ -//! Modules for events in the *m.policy* namespace. +//! Modules for events in the `m.policy` namespace. pub mod rule; diff --git a/crates/ruma-events/src/policy/rule.rs b/crates/ruma-events/src/policy/rule.rs index 7f9ee346..6c82abb9 100644 --- a/crates/ruma-events/src/policy/rule.rs +++ b/crates/ruma-events/src/policy/rule.rs @@ -1,4 +1,4 @@ -//! Modules and types for events in the *m.policy.rule* namespace. +//! Modules and types for events in the `m.policy.rule` namespace. use ruma_serde::StringEnum; use serde::{Deserialize, Serialize}; diff --git a/crates/ruma-events/src/policy/rule/room.rs b/crates/ruma-events/src/policy/rule/room.rs index 8ccbc9e0..4273d9da 100644 --- a/crates/ruma-events/src/policy/rule/room.rs +++ b/crates/ruma-events/src/policy/rule/room.rs @@ -1,4 +1,4 @@ -//! Types for the *m.policy.rule.room* event. +//! Types for the `m.policy.rule.room` event. use ruma_events_macros::EventContent; use serde::{Deserialize, Serialize}; diff --git a/crates/ruma-events/src/policy/rule/server.rs b/crates/ruma-events/src/policy/rule/server.rs index 3524c6ea..81509d8d 100644 --- a/crates/ruma-events/src/policy/rule/server.rs +++ b/crates/ruma-events/src/policy/rule/server.rs @@ -1,4 +1,4 @@ -//! Types for the *m.policy.rule.server* event. +//! Types for the `m.policy.rule.server` event. use ruma_events_macros::EventContent; use serde::{Deserialize, Serialize}; diff --git a/crates/ruma-events/src/policy/rule/user.rs b/crates/ruma-events/src/policy/rule/user.rs index 3eca0db5..8d09fe91 100644 --- a/crates/ruma-events/src/policy/rule/user.rs +++ b/crates/ruma-events/src/policy/rule/user.rs @@ -1,4 +1,4 @@ -//! Types for the *m.policy.rule.user* event. +//! Types for the `m.policy.rule.user` event. use ruma_events_macros::EventContent; use serde::{Deserialize, Serialize}; diff --git a/crates/ruma-events/src/push_rules.rs b/crates/ruma-events/src/push_rules.rs index f4e4d9ed..fa0ebdeb 100644 --- a/crates/ruma-events/src/push_rules.rs +++ b/crates/ruma-events/src/push_rules.rs @@ -1,4 +1,4 @@ -//! Types for the *m.push_rules* event. +//! Types for the `m.push_rules` event. use ruma_common::push::Ruleset; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/reaction.rs b/crates/ruma-events/src/reaction.rs index a313b7f9..00f44894 100644 --- a/crates/ruma-events/src/reaction.rs +++ b/crates/ruma-events/src/reaction.rs @@ -1,4 +1,4 @@ -//! Types for the *m.reaction* event. +//! Types for the `m.reaction` event. use ruma_events_macros::EventContent; use ruma_identifiers::EventId; diff --git a/crates/ruma-events/src/receipt.rs b/crates/ruma-events/src/receipt.rs index a4f0362b..97f00883 100644 --- a/crates/ruma-events/src/receipt.rs +++ b/crates/ruma-events/src/receipt.rs @@ -1,4 +1,4 @@ -//! Types for the *m.receipt* event. +//! Types for the `m.receipt` event. use std::{ collections::BTreeMap, diff --git a/crates/ruma-events/src/room.rs b/crates/ruma-events/src/room.rs index 3fb9b147..872dbe20 100644 --- a/crates/ruma-events/src/room.rs +++ b/crates/ruma-events/src/room.rs @@ -1,4 +1,4 @@ -//! Modules for events in the *m.room* namespace. +//! Modules for events in the `m.room` namespace. //! //! This module also contains types shared by events in its child namespaces. diff --git a/crates/ruma-events/src/room/aliases.rs b/crates/ruma-events/src/room/aliases.rs index 4e5590cb..47d23d1b 100644 --- a/crates/ruma-events/src/room/aliases.rs +++ b/crates/ruma-events/src/room/aliases.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.aliases* event. +//! Types for the `m.room.aliases` event. use ruma_events_macros::EventContent; use ruma_identifiers::{RoomAliasId, RoomVersionId}; diff --git a/crates/ruma-events/src/room/avatar.rs b/crates/ruma-events/src/room/avatar.rs index 6a657d1b..ee142591 100644 --- a/crates/ruma-events/src/room/avatar.rs +++ b/crates/ruma-events/src/room/avatar.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.avatar* event. +//! Types for the `m.room.avatar` event. use js_int::UInt; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/room/canonical_alias.rs b/crates/ruma-events/src/room/canonical_alias.rs index 7231e8f2..ea97e45d 100644 --- a/crates/ruma-events/src/room/canonical_alias.rs +++ b/crates/ruma-events/src/room/canonical_alias.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.canonical_alias* event. +//! Types for the `m.room.canonical_alias` event. use ruma_events_macros::EventContent; use ruma_identifiers::RoomAliasId; diff --git a/crates/ruma-events/src/room/create.rs b/crates/ruma-events/src/room/create.rs index e5932b3d..27aeac50 100644 --- a/crates/ruma-events/src/room/create.rs +++ b/crates/ruma-events/src/room/create.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.create* event. +//! Types for the `m.room.create` event. use ruma_events_macros::EventContent; use ruma_identifiers::{EventId, RoomId, RoomVersionId, UserId}; diff --git a/crates/ruma-events/src/room/encrypted.rs b/crates/ruma-events/src/room/encrypted.rs index 29b4cedc..28f966b2 100644 --- a/crates/ruma-events/src/room/encrypted.rs +++ b/crates/ruma-events/src/room/encrypted.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.encrypted* event. +//! Types for the `m.room.encrypted` event. use std::collections::BTreeMap; @@ -72,11 +72,11 @@ impl From for ToDeviceEncryptedEventContent { #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[serde(tag = "algorithm")] pub enum EncryptedEventScheme { - /// An event encrypted with *m.olm.v1.curve25519-aes-sha2*. + /// An event encrypted with `m.olm.v1.curve25519-aes-sha2`. #[serde(rename = "m.olm.v1.curve25519-aes-sha2")] OlmV1Curve25519AesSha2(OlmV1Curve25519AesSha2Content), - /// An event encrypted with *m.megolm.v1.aes-sha2*. + /// An event encrypted with `m.megolm.v1.aes-sha2`. #[serde(rename = "m.megolm.v1.aes-sha2")] MegolmV1AesSha2(MegolmV1AesSha2Content), } @@ -165,7 +165,7 @@ impl Annotation { } } -/// The content of an `m.room.encrypted` event using the *m.olm.v1.curve25519-aes-sha2* algorithm. +/// The content of an `m.room.encrypted` event using the `m.olm.v1.curve25519-aes-sha2` algorithm. #[derive(Clone, Debug, Serialize, Deserialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct OlmV1Curve25519AesSha2Content { @@ -185,7 +185,7 @@ impl OlmV1Curve25519AesSha2Content { /// Ciphertext information holding the ciphertext and message type. /// -/// Used for messages encrypted with the *m.olm.v1.curve25519-aes-sha2* algorithm. +/// Used for messages encrypted with the `m.olm.v1.curve25519-aes-sha2` algorithm. #[derive(Clone, Debug, Deserialize, Serialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct CiphertextInfo { @@ -204,7 +204,7 @@ impl CiphertextInfo { } } -/// The content of an `m.room.encrypted` event using the *m.megolm.v1.aes-sha2* algorithm. +/// The content of an `m.room.encrypted` event using the `m.megolm.v1.aes-sha2` algorithm. /// /// To create an instance of this type, first create a `MegolmV1AesSha2ContentInit` and convert it /// via `MegolmV1AesSha2Content::from` / `.into()`. diff --git a/crates/ruma-events/src/room/encryption.rs b/crates/ruma-events/src/room/encryption.rs index 02a4729a..68a47bd8 100644 --- a/crates/ruma-events/src/room/encryption.rs +++ b/crates/ruma-events/src/room/encryption.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.encryption* event. +//! Types for the `m.room.encryption` event. use js_int::UInt; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/room/guest_access.rs b/crates/ruma-events/src/room/guest_access.rs index d9cea55e..623310d6 100644 --- a/crates/ruma-events/src/room/guest_access.rs +++ b/crates/ruma-events/src/room/guest_access.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.guest_access* event. +//! Types for the `m.room.guest_access` event. use ruma_events_macros::EventContent; use ruma_serde::StringEnum; diff --git a/crates/ruma-events/src/room/history_visibility.rs b/crates/ruma-events/src/room/history_visibility.rs index ee8db194..f7869cb7 100644 --- a/crates/ruma-events/src/room/history_visibility.rs +++ b/crates/ruma-events/src/room/history_visibility.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.history_visibility* event. +//! Types for the `m.room.history_visibility` event. use ruma_events_macros::EventContent; use ruma_serde::StringEnum; diff --git a/crates/ruma-events/src/room/join_rules.rs b/crates/ruma-events/src/room/join_rules.rs index d576ec02..c3251bdb 100644 --- a/crates/ruma-events/src/room/join_rules.rs +++ b/crates/ruma-events/src/room/join_rules.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.join_rules* event. +//! Types for the `m.room.join_rules` event. use ruma_events_macros::EventContent; #[cfg(feature = "unstable-pre-spec")] diff --git a/crates/ruma-events/src/room/member.rs b/crates/ruma-events/src/room/member.rs index 856348f9..706881d0 100644 --- a/crates/ruma-events/src/room/member.rs +++ b/crates/ruma-events/src/room/member.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.member* event. +//! Types for the `m.room.member` event. use std::collections::BTreeMap; @@ -20,7 +20,7 @@ use crate::{StrippedStateEvent, SyncStateEvent}; /// directly will fail. /// /// The `third_party_invite` property will be set if this invite is an *invite* event and is the -/// successor of an *m.room.third_party_invite* event, and absent otherwise. +/// successor of an `m.room.third_party_invite` event, and absent otherwise. /// /// This event may also include an `invite_room_state` key inside the event's unsigned data. If /// present, this contains an array of `StrippedState` events. These events provide information diff --git a/crates/ruma-events/src/room/message.rs b/crates/ruma-events/src/room/message.rs index 1359d09f..a4d07e8b 100644 --- a/crates/ruma-events/src/room/message.rs +++ b/crates/ruma-events/src/room/message.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.message* event. +//! Types for the `m.room.message` event. use std::borrow::Cow; diff --git a/crates/ruma-events/src/room/message/feedback.rs b/crates/ruma-events/src/room/message/feedback.rs index c1b526e5..ba23042d 100644 --- a/crates/ruma-events/src/room/message/feedback.rs +++ b/crates/ruma-events/src/room/message/feedback.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.message.feedback* event. +//! Types for the `m.room.message.feedback` event. use ruma_events_macros::EventContent; use ruma_identifiers::EventId; diff --git a/crates/ruma-events/src/room/name.rs b/crates/ruma-events/src/room/name.rs index e44c583e..6891560b 100644 --- a/crates/ruma-events/src/room/name.rs +++ b/crates/ruma-events/src/room/name.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.name* event. +//! Types for the `m.room.name` event. use ruma_events_macros::EventContent; use ruma_identifiers::RoomNameBox; diff --git a/crates/ruma-events/src/room/pinned_events.rs b/crates/ruma-events/src/room/pinned_events.rs index cefd8aaa..57e561cc 100644 --- a/crates/ruma-events/src/room/pinned_events.rs +++ b/crates/ruma-events/src/room/pinned_events.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.pinned_events* event. +//! Types for the `m.room.pinned_events` event. use ruma_events_macros::EventContent; use ruma_identifiers::EventId; diff --git a/crates/ruma-events/src/room/power_levels.rs b/crates/ruma-events/src/room/power_levels.rs index 3ee64745..5c2ac969 100644 --- a/crates/ruma-events/src/room/power_levels.rs +++ b/crates/ruma-events/src/room/power_levels.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.power_levels* event. +//! Types for the `m.room.power_levels` event. use std::collections::BTreeMap; diff --git a/crates/ruma-events/src/room/redaction.rs b/crates/ruma-events/src/room/redaction.rs index 4cde1aae..8209ec80 100644 --- a/crates/ruma-events/src/room/redaction.rs +++ b/crates/ruma-events/src/room/redaction.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.redaction* event. +//! Types for the `m.room.redaction` event. use ruma_common::MilliSecondsSinceUnixEpoch; use ruma_events_macros::{Event, EventContent}; diff --git a/crates/ruma-events/src/room/server_acl.rs b/crates/ruma-events/src/room/server_acl.rs index c1b2dec6..9f7b9a4b 100644 --- a/crates/ruma-events/src/room/server_acl.rs +++ b/crates/ruma-events/src/room/server_acl.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.server_acl* event. +//! Types for the `m.room.server_acl` event. use ruma_events_macros::EventContent; use serde::{Deserialize, Serialize}; diff --git a/crates/ruma-events/src/room/third_party_invite.rs b/crates/ruma-events/src/room/third_party_invite.rs index bc62ad14..34d33bc4 100644 --- a/crates/ruma-events/src/room/third_party_invite.rs +++ b/crates/ruma-events/src/room/third_party_invite.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.third_party_invite* event. +//! Types for the `m.room.third_party_invite` event. use ruma_events_macros::EventContent; use serde::{Deserialize, Serialize}; @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; /// /// An invitation to a room issued to a third party identifier, rather than a matrix user ID. /// -/// Acts as an *m.room.member* invite event, where there isn't a target user_id to invite. This +/// Acts as an `m.room.member` invite event, where there isn't a target user_id to invite. This /// event contains a token and a public key whose private key must be used to sign the token. /// Any user who can present that signature may use this invitation to join the target room. #[derive(Clone, Debug, Deserialize, Serialize, EventContent)] diff --git a/crates/ruma-events/src/room/tombstone.rs b/crates/ruma-events/src/room/tombstone.rs index 54a5dd55..c232b73c 100644 --- a/crates/ruma-events/src/room/tombstone.rs +++ b/crates/ruma-events/src/room/tombstone.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.tombstone* event. +//! Types for the `m.room.tombstone` event. use ruma_events_macros::EventContent; use ruma_identifiers::RoomId; diff --git a/crates/ruma-events/src/room/topic.rs b/crates/ruma-events/src/room/topic.rs index e7a6e5a2..a8a0ce12 100644 --- a/crates/ruma-events/src/room/topic.rs +++ b/crates/ruma-events/src/room/topic.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room.topic* event. +//! Types for the `m.room.topic` event. use ruma_events_macros::EventContent; use serde::{Deserialize, Serialize}; diff --git a/crates/ruma-events/src/room_key.rs b/crates/ruma-events/src/room_key.rs index bb552852..3bae54cc 100644 --- a/crates/ruma-events/src/room_key.rs +++ b/crates/ruma-events/src/room_key.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room_key* event. +//! Types for the `m.room_key` event. use ruma_events_macros::EventContent; use ruma_identifiers::{EventEncryptionAlgorithm, RoomId}; @@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize}; /// The content of an `m.room_key` event. /// -/// Typically encrypted as an *m.room.encrypted* event, then sent as a to-device event. +/// Typically encrypted as an `m.room.encrypted` event, then sent as a to-device event. #[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[ruma_event(type = "m.room_key", kind = ToDevice)] diff --git a/crates/ruma-events/src/room_key_request.rs b/crates/ruma-events/src/room_key_request.rs index 1f8680d2..ed3c1f8c 100644 --- a/crates/ruma-events/src/room_key_request.rs +++ b/crates/ruma-events/src/room_key_request.rs @@ -1,4 +1,4 @@ -//! Types for the *m.room_key_request* event. +//! Types for the `m.room_key_request` event. use ruma_events_macros::EventContent; use ruma_identifiers::{DeviceIdBox, EventEncryptionAlgorithm, RoomId}; diff --git a/crates/ruma-events/src/secret.rs b/crates/ruma-events/src/secret.rs index 8d36285d..b2d65a34 100644 --- a/crates/ruma-events/src/secret.rs +++ b/crates/ruma-events/src/secret.rs @@ -1,4 +1,4 @@ -//! Module for events in the *m.secret* namespace. +//! Module for events in the `m.secret` namespace. pub mod request; pub mod send; diff --git a/crates/ruma-events/src/secret/request.rs b/crates/ruma-events/src/secret/request.rs index bd65d140..f86f51a4 100644 --- a/crates/ruma-events/src/secret/request.rs +++ b/crates/ruma-events/src/secret/request.rs @@ -1,4 +1,4 @@ -//! Types for the *m.secret.request* event. +//! Types for the `m.secret.request` event. use std::convert::TryFrom; @@ -43,7 +43,7 @@ impl ToDeviceRequestEventContent { } } -/// Action for an *m.secret.request* event. +/// Action for an `m.secret.request` event. #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Deserialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[serde(try_from = "RequestActionJsonRepr")] diff --git a/crates/ruma-events/src/secret/send.rs b/crates/ruma-events/src/secret/send.rs index 8d88a002..a06ee643 100644 --- a/crates/ruma-events/src/secret/send.rs +++ b/crates/ruma-events/src/secret/send.rs @@ -1,4 +1,4 @@ -//! Types for the *m.secret.send* event. +//! Types for the `m.secret.send` event. use ruma_events_macros::EventContent; use serde::{Deserialize, Serialize}; diff --git a/crates/ruma-events/src/space.rs b/crates/ruma-events/src/space.rs index c8b62d3b..52b285e4 100644 --- a/crates/ruma-events/src/space.rs +++ b/crates/ruma-events/src/space.rs @@ -1,4 +1,4 @@ -//! Types for the *m.space* events. +//! Types for the `m.space` events. //! //! See [MSC2758] and [MSC1772]. //! diff --git a/crates/ruma-events/src/space/child.rs b/crates/ruma-events/src/space/child.rs index 7276d637..dc35bff8 100644 --- a/crates/ruma-events/src/space/child.rs +++ b/crates/ruma-events/src/space/child.rs @@ -1,4 +1,4 @@ -//! Types for the *m.space.child* event. +//! Types for the `m.space.child` event. use ruma_events_macros::EventContent; use ruma_identifiers::ServerNameBox; diff --git a/crates/ruma-events/src/space/parent.rs b/crates/ruma-events/src/space/parent.rs index 213e1b8a..361b4069 100644 --- a/crates/ruma-events/src/space/parent.rs +++ b/crates/ruma-events/src/space/parent.rs @@ -1,4 +1,4 @@ -//! Types for the *m.space.child* event. +//! Types for the `m.space.child` event. use ruma_events_macros::EventContent; use ruma_identifiers::ServerNameBox; diff --git a/crates/ruma-events/src/sticker.rs b/crates/ruma-events/src/sticker.rs index 4b2cd9db..b4d250b0 100644 --- a/crates/ruma-events/src/sticker.rs +++ b/crates/ruma-events/src/sticker.rs @@ -1,4 +1,4 @@ -//! Types for the *m.sticker* event. +//! Types for the `m.sticker` event. use ruma_events_macros::EventContent; use ruma_identifiers::MxcUri; diff --git a/crates/ruma-events/src/tag.rs b/crates/ruma-events/src/tag.rs index 0cec4556..17a2a073 100644 --- a/crates/ruma-events/src/tag.rs +++ b/crates/ruma-events/src/tag.rs @@ -1,4 +1,4 @@ -//! Types for the *m.tag* event. +//! Types for the `m.tag` event. use std::{collections::BTreeMap, error::Error, fmt, str::FromStr}; diff --git a/crates/ruma-events/src/typing.rs b/crates/ruma-events/src/typing.rs index a726cbdc..91f103e1 100644 --- a/crates/ruma-events/src/typing.rs +++ b/crates/ruma-events/src/typing.rs @@ -1,4 +1,4 @@ -//! Types for the *m.typing* event. +//! Types for the `m.typing` event. use ruma_events_macros::EventContent; use ruma_identifiers::UserId;