events: Use inline code blocks instead of emphasis for type strings

This commit is contained in:
Jonas Platte 2021-10-01 18:35:01 +02:00
parent 0101e110f8
commit edbd5a696c
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
61 changed files with 107 additions and 107 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,4 @@
//! Types for the *m.direct* event.
//! Types for the `m.direct` event.
use std::{
collections::BTreeMap,

View File

@ -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)]

View File

@ -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};

View File

@ -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;

View File

@ -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;

View File

@ -1,3 +1,3 @@
//! Modules for events in the *m.key* namespace.
//! Modules for events in the `m.key` namespace.
pub mod verification;

View File

@ -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,

View File

@ -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<String, JsonValue>,
}
/// 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<ShortAuthenticationString>,
/// 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<ShortAuthenticationString>,
/// 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,
}

View File

@ -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")]

View File

@ -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,
}

View File

@ -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.

View File

@ -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.

View File

@ -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)]

View File

@ -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;

View File

@ -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<String, JsonValue>,
}
/// 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()`.

View File

@ -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.
//!

View File

@ -1,3 +1,3 @@
//! Modules for events in the *m.policy* namespace.
//! Modules for events in the `m.policy` namespace.
pub mod rule;

View File

@ -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};

View File

@ -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};

View File

@ -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};

View File

@ -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};

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,4 @@
//! Types for the *m.receipt* event.
//! Types for the `m.receipt` event.
use std::{
collections::BTreeMap,

View File

@ -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.

View File

@ -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};

View File

@ -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;

View File

@ -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;

View File

@ -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};

View File

@ -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<EncryptedEventScheme> 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()`.

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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")]

View File

@ -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

View File

@ -1,4 +1,4 @@
//! Types for the *m.room.message* event.
//! Types for the `m.room.message` event.
use std::borrow::Cow;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,4 @@
//! Types for the *m.room.power_levels* event.
//! Types for the `m.room.power_levels` event.
use std::collections::BTreeMap;

View File

@ -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};

View File

@ -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};

View File

@ -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)]

View File

@ -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;

View File

@ -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};

View File

@ -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)]

View File

@ -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};

View File

@ -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;

View File

@ -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")]

View File

@ -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};

View File

@ -1,4 +1,4 @@
//! Types for the *m.space* events.
//! Types for the `m.space` events.
//!
//! See [MSC2758] and [MSC1772].
//!

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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};

View File

@ -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;