Reorder derives (std first)

This commit is contained in:
Jonas Platte 2020-04-29 22:22:42 +02:00
parent c68df54eef
commit fd5527da78
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
23 changed files with 56 additions and 56 deletions

View File

@ -10,7 +10,7 @@ pub mod hangup;
pub mod invite; pub mod invite;
/// A VoIP session description. /// A VoIP session description.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct SessionDescription { pub struct SessionDescription {
/// The type of session description. /// The type of session description.
#[serde(rename = "type")] #[serde(rename = "type")]
@ -21,7 +21,7 @@ pub struct SessionDescription {
} }
/// The type of VoIP session description. /// The type of VoIP session description.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub enum SessionDescriptionType { pub enum SessionDescriptionType {
/// An answer. /// An answer.
#[serde(rename = "answer")] #[serde(rename = "answer")]

View File

@ -25,7 +25,7 @@ ruma_event! {
} }
/// An ICE (Interactive Connectivity Establishment) candidate. /// An ICE (Interactive Connectivity Establishment) candidate.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct Candidate { pub struct Candidate {
/// The SDP "a" line of the candidate. /// The SDP "a" line of the candidate.
pub candidate: String, pub candidate: String,

View File

@ -28,7 +28,7 @@ ruma_event! {
/// This should not be provided when the user naturally ends or rejects the call. When there was an /// This should not be provided when the user naturally ends or rejects the call. When there was an
/// error in the call negotiation, this should be `ice_failed` for when ICE negotiation fails or /// error in the call negotiation, this should be `ice_failed` for when ICE negotiation fails or
/// `invite_timeout` for when the other party did not answer in time. /// `invite_timeout` for when the other party did not answer in time.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub enum Reason { pub enum Reason {
/// ICE negotiation failure. /// ICE negotiation failure.
#[serde(rename = "ice_failed")] #[serde(rename = "ice_failed")]

View File

@ -97,7 +97,7 @@ impl_enum! {
} }
/// A Short Authentication String (SAS) verification method. /// A Short Authentication String (SAS) verification method.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub enum VerificationMethod { pub enum VerificationMethod {
/// The *m.sas.v1* verification method. /// The *m.sas.v1* verification method.
#[serde(rename = "m.sas.v1")] #[serde(rename = "m.sas.v1")]

View File

@ -103,7 +103,7 @@ pub(crate) mod raw {
/// Begins an SAS key verification process. /// Begins an SAS key verification process.
/// ///
/// Typically sent as a to-device event. /// Typically sent as a to-device event.
#[derive(Clone, Debug, Deserialize, PartialEq)] #[derive(Clone, Debug, PartialEq, Deserialize)]
pub struct StartEvent { pub struct StartEvent {
/// The event's content. /// The event's content.
pub content: StartEventContent, pub content: StartEventContent,

View File

@ -42,7 +42,7 @@ ruma_event! {
} }
/// A description of a user's connectivity and availability for chat. /// A description of a user's connectivity and availability for chat.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub enum PresenceState { pub enum PresenceState {
/// Disconnected from the service. /// Disconnected from the service.
#[serde(rename = "offline")] #[serde(rename = "offline")]

View File

@ -31,7 +31,7 @@ ruma_event! {
/// ///
/// For example, some rules may only be applied for messages from a particular sender, a particular /// For example, some rules may only be applied for messages from a particular sender, a particular
/// room, or by default. The push ruleset contains the entire set of scopes and rules. /// room, or by default. The push ruleset contains the entire set of scopes and rules.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct Ruleset { pub struct Ruleset {
/// These rules configure behaviour for (unencrypted) messages that match certain patterns. /// These rules configure behaviour for (unencrypted) messages that match certain patterns.
pub content: Vec<PatternedPushRule>, pub content: Vec<PatternedPushRule>,
@ -56,7 +56,7 @@ pub struct Ruleset {
/// ///
/// These rules are stored on the user's homeserver. They are manually configured by the user, who /// These rules are stored on the user's homeserver. They are manually configured by the user, who
/// can create and view them via the Client/Server API. /// can create and view them via the Client/Server API.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct PushRule { pub struct PushRule {
/// Actions to determine if and how a notification is delivered for events matching this rule. /// Actions to determine if and how a notification is delivered for events matching this rule.
pub actions: Vec<Action>, pub actions: Vec<Action>,
@ -74,7 +74,7 @@ pub struct PushRule {
/// Like `PushRule`, but with an additional `conditions` field. /// Like `PushRule`, but with an additional `conditions` field.
/// ///
/// Only applicable to underride and override rules. /// Only applicable to underride and override rules.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct ConditionalPushRule { pub struct ConditionalPushRule {
/// Actions to determine if and how a notification is delivered for events matching this rule. /// Actions to determine if and how a notification is delivered for events matching this rule.
pub actions: Vec<Action>, pub actions: Vec<Action>,
@ -97,7 +97,7 @@ pub struct ConditionalPushRule {
/// Like `PushRule`, but with an additional `pattern` field. /// Like `PushRule`, but with an additional `pattern` field.
/// ///
/// Only applicable to content rules. /// Only applicable to content rules.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct PatternedPushRule { pub struct PatternedPushRule {
/// Actions to determine if and how a notification is delivered for events matching this rule. /// Actions to determine if and how a notification is delivered for events matching this rule.
pub actions: Vec<Action>, pub actions: Vec<Action>,
@ -229,7 +229,7 @@ impl<'de> Deserialize<'de> for Action {
} }
/// Values for the `set_tweak` action. /// Values for the `set_tweak` action.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[serde(tag = "set_tweak")] #[serde(tag = "set_tweak")]
pub enum Tweak { pub enum Tweak {
/// A string representing the sound to be played when this notification arrives. /// A string representing the sound to be played when this notification arrives.

View File

@ -29,7 +29,7 @@ ruma_event! {
} }
/// A collection of receipts. /// A collection of receipts.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct Receipts { pub struct Receipts {
/// A collection of users who have sent *m.read* receipts for this event. /// A collection of users who have sent *m.read* receipts for this event.
#[serde(rename = "m.read")] #[serde(rename = "m.read")]

View File

@ -28,7 +28,7 @@ pub mod tombstone;
pub mod topic; pub mod topic;
/// Metadata about an image. /// Metadata about an image.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct ImageInfo { pub struct ImageInfo {
/// The height of the image in pixels. /// The height of the image in pixels.
#[serde(rename = "h")] #[serde(rename = "h")]
@ -62,7 +62,7 @@ pub struct ImageInfo {
} }
/// Metadata about a thumbnail. /// Metadata about a thumbnail.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct ThumbnailInfo { pub struct ThumbnailInfo {
/// The height of the thumbnail in pixels. /// The height of the thumbnail in pixels.
#[serde(rename = "h")] #[serde(rename = "h")]
@ -84,7 +84,7 @@ pub struct ThumbnailInfo {
} }
/// A file sent to a room with end-to-end encryption enabled. /// A file sent to a room with end-to-end encryption enabled.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct EncryptedFile { pub struct EncryptedFile {
/// The URL to the file. /// The URL to the file.
pub url: String, pub url: String,
@ -104,7 +104,7 @@ pub struct EncryptedFile {
} }
/// A [JSON Web Key](https://tools.ietf.org/html/rfc7517#appendix-A.3) object. /// A [JSON Web Key](https://tools.ietf.org/html/rfc7517#appendix-A.3) object.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct JsonWebKey { pub struct JsonWebKey {
/// Key type. Must be `oct`. /// Key type. Must be `oct`.
pub kty: String, pub kty: String,

View File

@ -35,7 +35,7 @@ ruma_event! {
} }
/// A reference to an old room replaced during a room version upgrade. /// A reference to an old room replaced during a room version upgrade.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct PreviousRoom { pub struct PreviousRoom {
/// The ID of the old room. /// The ID of the old room.
pub room_id: RoomId, pub room_id: RoomId,

View File

@ -106,7 +106,7 @@ pub(crate) mod raw {
/// ///
/// This type is to be used within a room. For a to-device event, use `EncryptedEventContent` /// This type is to be used within a room. For a to-device event, use `EncryptedEventContent`
/// directly. /// directly.
#[derive(Clone, Debug, Deserialize, PartialEq)] #[derive(Clone, Debug, PartialEq, Deserialize)]
pub struct EncryptedEvent { pub struct EncryptedEvent {
/// The event's content. /// The event's content.
pub content: EncryptedEventContent, pub content: EncryptedEventContent,
@ -207,7 +207,7 @@ pub struct OlmV1Curve25519AesSha2Content {
/// Ciphertext information holding the ciphertext and message type. /// 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, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct CiphertextInfo { pub struct CiphertextInfo {
/// The encrypted payload. /// The encrypted payload.
pub body: String, pub body: String,

View File

@ -19,7 +19,7 @@ ruma_event! {
} }
/// A policy for guest user access to a room. /// A policy for guest user access to a room.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub enum GuestAccess { pub enum GuestAccess {
/// Guests are allowed to join the room. /// Guests are allowed to join the room.
#[serde(rename = "can_join")] #[serde(rename = "can_join")]

View File

@ -17,7 +17,7 @@ ruma_event! {
} }
/// Who can see a room's history. /// Who can see a room's history.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub enum HistoryVisibility { pub enum HistoryVisibility {
/// Previous events are accessible to newly joined members from the point they were invited /// Previous events are accessible to newly joined members from the point they were invited
/// onwards. Events stop being accessible when the member's state changes to something other /// onwards. Events stop being accessible when the member's state changes to something other

View File

@ -16,7 +16,7 @@ ruma_event! {
} }
/// The rule used for users wishing to join this room. /// The rule used for users wishing to join this room.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub enum JoinRule { pub enum JoinRule {
/// A user who wishes to join the room must first receive an invite to the room from someone /// A user who wishes to join the room must first receive an invite to the room from someone
/// already inside of the room. /// already inside of the room.

View File

@ -61,7 +61,7 @@ ruma_event! {
} }
/// The membership state of a user. /// The membership state of a user.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub enum MembershipState { pub enum MembershipState {
/// The user is banned. /// The user is banned.
#[serde(rename = "ban")] #[serde(rename = "ban")]
@ -101,7 +101,7 @@ impl_enum! {
} }
/// Information about a third party invitation. /// Information about a third party invitation.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct ThirdPartyInvite { pub struct ThirdPartyInvite {
/// A name which can be displayed to represent the user instead of their third party /// A name which can be displayed to represent the user instead of their third party
/// identifier. /// identifier.
@ -114,7 +114,7 @@ pub struct ThirdPartyInvite {
/// A block of content which has been signed, which servers can use to verify a third party /// A block of content which has been signed, which servers can use to verify a third party
/// invitation. /// invitation.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct SignedContent { pub struct SignedContent {
/// The invited Matrix user ID. /// The invited Matrix user ID.
/// ///
@ -130,7 +130,7 @@ pub struct SignedContent {
} }
/// Translation of the membership change in `m.room.member` event. /// Translation of the membership change in `m.room.member` event.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub enum MembershipChange { pub enum MembershipChange {
/// No change. /// No change.
None, None,

View File

@ -135,7 +135,7 @@ pub(crate) mod raw {
use crate::UnsignedData; use crate::UnsignedData;
/// A message sent to a room. /// A message sent to a room.
#[derive(Clone, Debug, Deserialize, PartialEq)] #[derive(Clone, Debug, PartialEq, Deserialize)]
pub struct MessageEvent { pub struct MessageEvent {
/// The event's content. /// The event's content.
pub content: MessageEventContent, pub content: MessageEventContent,
@ -249,7 +249,7 @@ pub(crate) mod raw {
} }
/// The message type of message event, e.g. `m.image` or `m.text`. /// The message type of message event, e.g. `m.image` or `m.text`.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub enum MessageType { pub enum MessageType {
/// An audio message. /// An audio message.
#[serde(rename = "m.audio")] #[serde(rename = "m.audio")]
@ -295,7 +295,7 @@ pub enum MessageType {
} }
/// The payload for an audio message. /// The payload for an audio message.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[serde(tag = "msgtype", rename = "m.audio")] #[serde(tag = "msgtype", rename = "m.audio")]
pub struct AudioMessageEventContent { pub struct AudioMessageEventContent {
/// The textual representation of this message. /// The textual representation of this message.
@ -316,7 +316,7 @@ pub struct AudioMessageEventContent {
} }
/// Metadata about an audio clip. /// Metadata about an audio clip.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct AudioInfo { pub struct AudioInfo {
/// The duration of the audio in milliseconds. /// The duration of the audio in milliseconds.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@ -332,7 +332,7 @@ pub struct AudioInfo {
} }
/// The payload for an emote message. /// The payload for an emote message.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[serde(tag = "msgtype", rename = "m.emote")] #[serde(tag = "msgtype", rename = "m.emote")]
pub struct EmoteMessageEventContent { pub struct EmoteMessageEventContent {
/// The emote action to perform. /// The emote action to perform.
@ -349,7 +349,7 @@ pub struct EmoteMessageEventContent {
} }
/// The payload for a file message. /// The payload for a file message.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[serde(tag = "msgtype", rename = "m.file")] #[serde(tag = "msgtype", rename = "m.file")]
pub struct FileMessageEventContent { pub struct FileMessageEventContent {
/// A human-readable description of the file. This is recommended to be the filename of the /// A human-readable description of the file. This is recommended to be the filename of the
@ -375,7 +375,7 @@ pub struct FileMessageEventContent {
} }
/// Metadata about a file. /// Metadata about a file.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct FileInfo { pub struct FileInfo {
/// The mimetype of the file, e.g. "application/msword." /// The mimetype of the file, e.g. "application/msword."
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@ -399,7 +399,7 @@ pub struct FileInfo {
} }
/// The payload for an image message. /// The payload for an image message.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[serde(tag = "msgtype", rename = "m.image")] #[serde(tag = "msgtype", rename = "m.image")]
pub struct ImageMessageEventContent { pub struct ImageMessageEventContent {
/// A textual representation of the image. This could be the alt text of the image, the filename /// A textual representation of the image. This could be the alt text of the image, the filename
@ -421,7 +421,7 @@ pub struct ImageMessageEventContent {
} }
/// The payload for a location message. /// The payload for a location message.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[serde(tag = "msgtype", rename = "m.location")] #[serde(tag = "msgtype", rename = "m.location")]
pub struct LocationMessageEventContent { pub struct LocationMessageEventContent {
/// A description of the location e.g. "Big Ben, London, UK,"or some kind of content description /// A description of the location e.g. "Big Ben, London, UK,"or some kind of content description
@ -437,7 +437,7 @@ pub struct LocationMessageEventContent {
} }
/// Thumbnail info associated with a location. /// Thumbnail info associated with a location.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct LocationInfo { pub struct LocationInfo {
/// Metadata about the image referred to in `thumbnail_url` or `thumbnail_file`. /// Metadata about the image referred to in `thumbnail_url` or `thumbnail_file`.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@ -455,7 +455,7 @@ pub struct LocationInfo {
} }
/// The payload for a notice message. /// The payload for a notice message.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[serde(tag = "msgtype", rename = "m.notice")] #[serde(tag = "msgtype", rename = "m.notice")]
pub struct NoticeMessageEventContent { pub struct NoticeMessageEventContent {
/// The notice text to send. /// The notice text to send.
@ -468,7 +468,7 @@ pub struct NoticeMessageEventContent {
} }
/// The payload for a server notice message. /// The payload for a server notice message.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[serde(tag = "msgtype", rename = "m.server_notice")] #[serde(tag = "msgtype", rename = "m.server_notice")]
pub struct ServerNoticeMessageEventContent { pub struct ServerNoticeMessageEventContent {
/// A human-readable description of the notice. /// A human-readable description of the notice.
@ -491,7 +491,7 @@ pub struct ServerNoticeMessageEventContent {
} }
/// Types of server notices. /// Types of server notices.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub enum ServerNoticeType { pub enum ServerNoticeType {
/// The server has exceeded some limit which requires the server administrator to intervene. /// The server has exceeded some limit which requires the server administrator to intervene.
#[serde(rename = "m.server_notice.usage_limit_reached")] #[serde(rename = "m.server_notice.usage_limit_reached")]
@ -505,7 +505,7 @@ pub enum ServerNoticeType {
} }
/// Types of usage limits. /// Types of usage limits.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub enum LimitType { pub enum LimitType {
/// The server's number of active users in the last 30 days has exceeded the maximum. /// The server's number of active users in the last 30 days has exceeded the maximum.
/// ///
@ -522,7 +522,7 @@ pub enum LimitType {
} }
/// The payload for a text message. /// The payload for a text message.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[serde(tag = "msgtype", rename = "m.text")] #[serde(tag = "msgtype", rename = "m.text")]
pub struct TextMessageEventContent { pub struct TextMessageEventContent {
/// The body of the message. /// The body of the message.
@ -544,7 +544,7 @@ pub struct TextMessageEventContent {
} }
/// The payload for a video message. /// The payload for a video message.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[serde(tag = "msgtype", rename = "m.video")] #[serde(tag = "msgtype", rename = "m.video")]
pub struct VideoMessageEventContent { pub struct VideoMessageEventContent {
/// A description of the video, e.g. "Gangnam Style," or some kind of content description for /// A description of the video, e.g. "Gangnam Style," or some kind of content description for
@ -566,7 +566,7 @@ pub struct VideoMessageEventContent {
} }
/// Metadata about a video. /// Metadata about a video.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct VideoInfo { pub struct VideoInfo {
/// The duration of the video in milliseconds. /// The duration of the video in milliseconds.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@ -606,7 +606,7 @@ pub struct VideoInfo {
/// Information about related messages for /// Information about related messages for
/// [rich replies](https://matrix.org/docs/spec/client_server/r0.5.0#rich-replies). /// [rich replies](https://matrix.org/docs/spec/client_server/r0.5.0#rich-replies).
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct RelatesTo { pub struct RelatesTo {
/// Information about another message being replied to. /// Information about another message being replied to.
#[serde(rename = "m.in_reply_to")] #[serde(rename = "m.in_reply_to")]
@ -614,7 +614,7 @@ pub struct RelatesTo {
} }
/// Information about the event a "rich reply" is replying to. /// Information about the event a "rich reply" is replying to.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct InReplyTo { pub struct InReplyTo {
/// The event being replied to. /// The event being replied to.
pub event_id: EventId, pub event_id: EventId,

View File

@ -24,7 +24,7 @@ ruma_event! {
} }
/// A type of feedback. /// A type of feedback.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub enum FeedbackType { pub enum FeedbackType {
/// Sent when a message is received. /// Sent when a message is received.
#[serde(rename = "delivered")] #[serde(rename = "delivered")]

View File

@ -109,7 +109,7 @@ pub(crate) mod raw {
use super::*; use super::*;
/// A human-friendly room name designed to be displayed to the end-user. /// A human-friendly room name designed to be displayed to the end-user.
#[derive(Clone, Debug, Deserialize, PartialEq)] #[derive(Clone, Debug, PartialEq, Deserialize)]
pub struct NameEvent { pub struct NameEvent {
/// The event's content. /// The event's content.
pub content: NameEventContent, pub content: NameEventContent,
@ -139,7 +139,7 @@ pub(crate) mod raw {
} }
/// The payload of a `NameEvent`. /// The payload of a `NameEvent`.
#[derive(Clone, Debug, Deserialize, PartialEq)] #[derive(Clone, Debug, PartialEq, Deserialize)]
pub struct NameEventContent { pub struct NameEventContent {
/// The name of the room. This MUST NOT exceed 255 bytes. /// The name of the room. This MUST NOT exceed 255 bytes.
// The spec says "A room with an m.room.name event with an absent, null, or empty name field // The spec says "A room with an m.room.name event with an absent, null, or empty name field

View File

@ -137,7 +137,7 @@ pub(crate) mod raw {
use super::*; use super::*;
/// Defines the power levels (privileges) of users in the room. /// Defines the power levels (privileges) of users in the room.
#[derive(Clone, Debug, Deserialize, PartialEq)] #[derive(Clone, Debug, PartialEq, Deserialize)]
pub struct PowerLevelsEvent { pub struct PowerLevelsEvent {
/// The event's content. /// The event's content.
pub content: PowerLevelsEventContent, pub content: PowerLevelsEventContent,
@ -167,7 +167,7 @@ pub(crate) mod raw {
} }
/// The payload for `PowerLevelsEvent`. /// The payload for `PowerLevelsEvent`.
#[derive(Clone, Debug, Deserialize, PartialEq)] #[derive(Clone, Debug, PartialEq, Deserialize)]
pub struct PowerLevelsEventContent { pub struct PowerLevelsEventContent {
/// The level required to ban a user. /// The level required to ban a user.
#[serde(default = "default_power_level")] #[serde(default = "default_power_level")]
@ -218,7 +218,7 @@ pub(crate) mod raw {
} }
/// The power level requirements for specific notification types. /// The power level requirements for specific notification types.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
pub struct NotificationPowerLevels { pub struct NotificationPowerLevels {
/// The level required to trigger an `@room` notification. /// The level required to trigger an `@room` notification.
#[serde(default = "default_power_level")] #[serde(default = "default_power_level")]

View File

@ -108,7 +108,7 @@ pub(crate) mod raw {
use super::*; use super::*;
/// An event to indicate which servers are permitted to participate in the room. /// An event to indicate which servers are permitted to participate in the room.
#[derive(Clone, Debug, Deserialize, PartialEq)] #[derive(Clone, Debug, PartialEq, Deserialize)]
pub struct ServerAclEvent { pub struct ServerAclEvent {
/// The event's content. /// The event's content.
pub content: ServerAclEventContent, pub content: ServerAclEventContent,

View File

@ -30,7 +30,7 @@ ruma_event! {
} }
/// A public key for signing a third party invite token. /// A public key for signing a third party invite token.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct PublicKey { pub struct PublicKey {
/// An optional URL which can be fetched to validate whether the key has been revoked. /// An optional URL which can be fetched to validate whether the key has been revoked.
/// ///

View File

@ -60,7 +60,7 @@ impl_enum! {
} }
/// Information about a requested key. /// Information about a requested key.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct RequestedKeyInfo { pub struct RequestedKeyInfo {
/// The encryption algorithm the requested key in this event is to be used with. /// The encryption algorithm the requested key in this event is to be used with.
pub algorithm: Algorithm, pub algorithm: Algorithm,

View File

@ -18,7 +18,7 @@ ruma_event! {
} }
/// Information about a tag. /// Information about a tag.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct TagInfo { pub struct TagInfo {
/// Value to use for lexicographically ordering rooms with this tag. /// Value to use for lexicographically ordering rooms with this tag.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]