Reorder derives (std first)
This commit is contained in:
parent
c68df54eef
commit
fd5527da78
@ -10,7 +10,7 @@ pub mod hangup;
|
||||
pub mod invite;
|
||||
|
||||
/// A VoIP session description.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct SessionDescription {
|
||||
/// The type of session description.
|
||||
#[serde(rename = "type")]
|
||||
@ -21,7 +21,7 @@ pub struct SessionDescription {
|
||||
}
|
||||
|
||||
/// The type of VoIP session description.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub enum SessionDescriptionType {
|
||||
/// An answer.
|
||||
#[serde(rename = "answer")]
|
||||
|
@ -25,7 +25,7 @@ ruma_event! {
|
||||
}
|
||||
|
||||
/// An ICE (Interactive Connectivity Establishment) candidate.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct Candidate {
|
||||
/// The SDP "a" line of the candidate.
|
||||
pub candidate: String,
|
||||
|
@ -28,7 +28,7 @@ ruma_event! {
|
||||
/// 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
|
||||
/// `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 {
|
||||
/// ICE negotiation failure.
|
||||
#[serde(rename = "ice_failed")]
|
||||
|
@ -97,7 +97,7 @@ impl_enum! {
|
||||
}
|
||||
|
||||
/// A Short Authentication String (SAS) verification method.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub enum VerificationMethod {
|
||||
/// The *m.sas.v1* verification method.
|
||||
#[serde(rename = "m.sas.v1")]
|
||||
|
@ -103,7 +103,7 @@ pub(crate) mod raw {
|
||||
/// Begins an SAS key verification process.
|
||||
///
|
||||
/// Typically sent as a to-device event.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize)]
|
||||
pub struct StartEvent {
|
||||
/// The event's content.
|
||||
pub content: StartEventContent,
|
||||
|
@ -42,7 +42,7 @@ ruma_event! {
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
/// Disconnected from the service.
|
||||
#[serde(rename = "offline")]
|
||||
|
@ -31,7 +31,7 @@ ruma_event! {
|
||||
///
|
||||
/// 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.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct Ruleset {
|
||||
/// These rules configure behaviour for (unencrypted) messages that match certain patterns.
|
||||
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
|
||||
/// 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 {
|
||||
/// Actions to determine if and how a notification is delivered for events matching this rule.
|
||||
pub actions: Vec<Action>,
|
||||
@ -74,7 +74,7 @@ pub struct PushRule {
|
||||
/// Like `PushRule`, but with an additional `conditions` field.
|
||||
///
|
||||
/// Only applicable to underride and override rules.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct ConditionalPushRule {
|
||||
/// Actions to determine if and how a notification is delivered for events matching this rule.
|
||||
pub actions: Vec<Action>,
|
||||
@ -97,7 +97,7 @@ pub struct ConditionalPushRule {
|
||||
/// Like `PushRule`, but with an additional `pattern` field.
|
||||
///
|
||||
/// Only applicable to content rules.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct PatternedPushRule {
|
||||
/// Actions to determine if and how a notification is delivered for events matching this rule.
|
||||
pub actions: Vec<Action>,
|
||||
@ -229,7 +229,7 @@ impl<'de> Deserialize<'de> for Action {
|
||||
}
|
||||
|
||||
/// Values for the `set_tweak` action.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
#[serde(tag = "set_tweak")]
|
||||
pub enum Tweak {
|
||||
/// A string representing the sound to be played when this notification arrives.
|
||||
|
@ -29,7 +29,7 @@ ruma_event! {
|
||||
}
|
||||
|
||||
/// A collection of receipts.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct Receipts {
|
||||
/// A collection of users who have sent *m.read* receipts for this event.
|
||||
#[serde(rename = "m.read")]
|
||||
|
@ -28,7 +28,7 @@ pub mod tombstone;
|
||||
pub mod topic;
|
||||
|
||||
/// Metadata about an image.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct ImageInfo {
|
||||
/// The height of the image in pixels.
|
||||
#[serde(rename = "h")]
|
||||
@ -62,7 +62,7 @@ pub struct ImageInfo {
|
||||
}
|
||||
|
||||
/// Metadata about a thumbnail.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct ThumbnailInfo {
|
||||
/// The height of the thumbnail in pixels.
|
||||
#[serde(rename = "h")]
|
||||
@ -84,7 +84,7 @@ pub struct ThumbnailInfo {
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
/// The URL to the file.
|
||||
pub url: String,
|
||||
@ -104,7 +104,7 @@ pub struct EncryptedFile {
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
/// Key type. Must be `oct`.
|
||||
pub kty: String,
|
||||
|
@ -35,7 +35,7 @@ ruma_event! {
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
/// The ID of the old room.
|
||||
pub room_id: RoomId,
|
||||
|
@ -106,7 +106,7 @@ pub(crate) mod raw {
|
||||
///
|
||||
/// This type is to be used within a room. For a to-device event, use `EncryptedEventContent`
|
||||
/// directly.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize)]
|
||||
pub struct EncryptedEvent {
|
||||
/// The event's content.
|
||||
pub content: EncryptedEventContent,
|
||||
@ -207,7 +207,7 @@ pub struct OlmV1Curve25519AesSha2Content {
|
||||
/// Ciphertext information holding the ciphertext and message type.
|
||||
///
|
||||
/// 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 {
|
||||
/// The encrypted payload.
|
||||
pub body: String,
|
||||
|
@ -19,7 +19,7 @@ ruma_event! {
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
/// Guests are allowed to join the room.
|
||||
#[serde(rename = "can_join")]
|
||||
|
@ -17,7 +17,7 @@ ruma_event! {
|
||||
}
|
||||
|
||||
/// Who can see a room's history.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub enum HistoryVisibility {
|
||||
/// 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
|
||||
|
@ -16,7 +16,7 @@ ruma_event! {
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
/// A user who wishes to join the room must first receive an invite to the room from someone
|
||||
/// already inside of the room.
|
||||
|
@ -61,7 +61,7 @@ ruma_event! {
|
||||
}
|
||||
|
||||
/// The membership state of a user.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub enum MembershipState {
|
||||
/// The user is banned.
|
||||
#[serde(rename = "ban")]
|
||||
@ -101,7 +101,7 @@ impl_enum! {
|
||||
}
|
||||
|
||||
/// Information about a third party invitation.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct ThirdPartyInvite {
|
||||
/// A name which can be displayed to represent the user instead of their third party
|
||||
/// 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
|
||||
/// invitation.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct SignedContent {
|
||||
/// The invited Matrix user ID.
|
||||
///
|
||||
@ -130,7 +130,7 @@ pub struct SignedContent {
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
/// No change.
|
||||
None,
|
||||
|
@ -135,7 +135,7 @@ pub(crate) mod raw {
|
||||
use crate::UnsignedData;
|
||||
|
||||
/// A message sent to a room.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize)]
|
||||
pub struct MessageEvent {
|
||||
/// The event's content.
|
||||
pub content: MessageEventContent,
|
||||
@ -249,7 +249,7 @@ pub(crate) mod raw {
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
/// An audio message.
|
||||
#[serde(rename = "m.audio")]
|
||||
@ -295,7 +295,7 @@ pub enum MessageType {
|
||||
}
|
||||
|
||||
/// The payload for an audio message.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
#[serde(tag = "msgtype", rename = "m.audio")]
|
||||
pub struct AudioMessageEventContent {
|
||||
/// The textual representation of this message.
|
||||
@ -316,7 +316,7 @@ pub struct AudioMessageEventContent {
|
||||
}
|
||||
|
||||
/// Metadata about an audio clip.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct AudioInfo {
|
||||
/// The duration of the audio in milliseconds.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@ -332,7 +332,7 @@ pub struct AudioInfo {
|
||||
}
|
||||
|
||||
/// The payload for an emote message.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
#[serde(tag = "msgtype", rename = "m.emote")]
|
||||
pub struct EmoteMessageEventContent {
|
||||
/// The emote action to perform.
|
||||
@ -349,7 +349,7 @@ pub struct EmoteMessageEventContent {
|
||||
}
|
||||
|
||||
/// The payload for a file message.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
#[serde(tag = "msgtype", rename = "m.file")]
|
||||
pub struct FileMessageEventContent {
|
||||
/// 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.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct FileInfo {
|
||||
/// The mimetype of the file, e.g. "application/msword."
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@ -399,7 +399,7 @@ pub struct FileInfo {
|
||||
}
|
||||
|
||||
/// The payload for an image message.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
#[serde(tag = "msgtype", rename = "m.image")]
|
||||
pub struct ImageMessageEventContent {
|
||||
/// 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.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
#[serde(tag = "msgtype", rename = "m.location")]
|
||||
pub struct LocationMessageEventContent {
|
||||
/// 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.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct LocationInfo {
|
||||
/// Metadata about the image referred to in `thumbnail_url` or `thumbnail_file`.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@ -455,7 +455,7 @@ pub struct LocationInfo {
|
||||
}
|
||||
|
||||
/// The payload for a notice message.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
#[serde(tag = "msgtype", rename = "m.notice")]
|
||||
pub struct NoticeMessageEventContent {
|
||||
/// The notice text to send.
|
||||
@ -468,7 +468,7 @@ pub struct NoticeMessageEventContent {
|
||||
}
|
||||
|
||||
/// 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")]
|
||||
pub struct ServerNoticeMessageEventContent {
|
||||
/// A human-readable description of the notice.
|
||||
@ -491,7 +491,7 @@ pub struct ServerNoticeMessageEventContent {
|
||||
}
|
||||
|
||||
/// Types of server notices.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub enum ServerNoticeType {
|
||||
/// The server has exceeded some limit which requires the server administrator to intervene.
|
||||
#[serde(rename = "m.server_notice.usage_limit_reached")]
|
||||
@ -505,7 +505,7 @@ pub enum ServerNoticeType {
|
||||
}
|
||||
|
||||
/// Types of usage limits.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub enum LimitType {
|
||||
/// 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.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
#[serde(tag = "msgtype", rename = "m.text")]
|
||||
pub struct TextMessageEventContent {
|
||||
/// The body of the message.
|
||||
@ -544,7 +544,7 @@ pub struct TextMessageEventContent {
|
||||
}
|
||||
|
||||
/// The payload for a video message.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
#[serde(tag = "msgtype", rename = "m.video")]
|
||||
pub struct VideoMessageEventContent {
|
||||
/// 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.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct VideoInfo {
|
||||
/// The duration of the video in milliseconds.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@ -606,7 +606,7 @@ pub struct VideoInfo {
|
||||
|
||||
/// Information about related messages for
|
||||
/// [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 {
|
||||
/// Information about another message being replied to.
|
||||
#[serde(rename = "m.in_reply_to")]
|
||||
@ -614,7 +614,7 @@ pub struct RelatesTo {
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
/// The event being replied to.
|
||||
pub event_id: EventId,
|
||||
|
@ -24,7 +24,7 @@ ruma_event! {
|
||||
}
|
||||
|
||||
/// A type of feedback.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub enum FeedbackType {
|
||||
/// Sent when a message is received.
|
||||
#[serde(rename = "delivered")]
|
||||
|
@ -109,7 +109,7 @@ pub(crate) mod raw {
|
||||
use super::*;
|
||||
|
||||
/// 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 {
|
||||
/// The event's content.
|
||||
pub content: NameEventContent,
|
||||
@ -139,7 +139,7 @@ pub(crate) mod raw {
|
||||
}
|
||||
|
||||
/// The payload of a `NameEvent`.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize)]
|
||||
pub struct NameEventContent {
|
||||
/// 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
|
||||
|
@ -137,7 +137,7 @@ pub(crate) mod raw {
|
||||
use super::*;
|
||||
|
||||
/// Defines the power levels (privileges) of users in the room.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize)]
|
||||
pub struct PowerLevelsEvent {
|
||||
/// The event's content.
|
||||
pub content: PowerLevelsEventContent,
|
||||
@ -167,7 +167,7 @@ pub(crate) mod raw {
|
||||
}
|
||||
|
||||
/// The payload for `PowerLevelsEvent`.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize)]
|
||||
pub struct PowerLevelsEventContent {
|
||||
/// The level required to ban a user.
|
||||
#[serde(default = "default_power_level")]
|
||||
@ -218,7 +218,7 @@ pub(crate) mod raw {
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
/// The level required to trigger an `@room` notification.
|
||||
#[serde(default = "default_power_level")]
|
||||
|
@ -108,7 +108,7 @@ pub(crate) mod raw {
|
||||
use super::*;
|
||||
|
||||
/// 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 {
|
||||
/// The event's content.
|
||||
pub content: ServerAclEventContent,
|
||||
|
@ -30,7 +30,7 @@ ruma_event! {
|
||||
}
|
||||
|
||||
/// 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 {
|
||||
/// An optional URL which can be fetched to validate whether the key has been revoked.
|
||||
///
|
||||
|
@ -60,7 +60,7 @@ impl_enum! {
|
||||
}
|
||||
|
||||
/// Information about a requested key.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct RequestedKeyInfo {
|
||||
/// The encryption algorithm the requested key in this event is to be used with.
|
||||
pub algorithm: Algorithm,
|
||||
|
@ -18,7 +18,7 @@ ruma_event! {
|
||||
}
|
||||
|
||||
/// Information about a tag.
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
|
||||
pub struct TagInfo {
|
||||
/// Value to use for lexicographically ordering rooms with this tag.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user